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.
 
 
 
 

32 lines
880 B

import fs from "node:fs"
import { defineRootConfig } from "somebuild"
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" }
: {}),
},
},
...(process.env.DEV ? { root: "./playground" } : {}),
},
},
},
})