You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
814 B
30 lines
814 B
import { defineRootConfig } from "somebuild";
|
|
import fs from "node:fs";
|
|
|
|
const loadJSON = (path) => JSON.parse(fs.readFileSync(new URL(path, import.meta.url), "utf8"));
|
|
|
|
const json = loadJSON("./package.json");
|
|
|
|
export default defineRootConfig({
|
|
mode: "component-vue2",
|
|
"component-vue2": {
|
|
less27: true,
|
|
outDir: "./dist",
|
|
name: json.name,
|
|
dtsEntryRoot: "src",
|
|
entry: "src/index.ts",
|
|
config: {
|
|
devWatchMode: true,
|
|
vite: {
|
|
resolve: {
|
|
alias: {
|
|
"@": "./src",
|
|
...(process.env.DEV
|
|
? { vue: "vue/dist/vue.esm.js" }
|
|
: {}),
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
});
|
|
|