Only build sourcemap for !prod
This commit is contained in:
parent
18cd0169d8
commit
a73165470e
|
@ -3,27 +3,30 @@ import { svelte } from "@sveltejs/vite-plugin-svelte"
|
||||||
import postcss from "postcss"
|
import postcss from "postcss"
|
||||||
import path from "path"
|
import path from "path"
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig(({ mode }) => {
|
||||||
build: {
|
const isProduction = mode === "production"
|
||||||
sourcemap: true,
|
return {
|
||||||
lib: {
|
build: {
|
||||||
entry: "src/index.js",
|
sourcemap: !isProduction,
|
||||||
formats: ["es"],
|
lib: {
|
||||||
fileName: "bbui.es",
|
entry: "src/index.js",
|
||||||
|
formats: ["es"],
|
||||||
|
fileName: "bbui.es",
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
plugins: [
|
||||||
plugins: [
|
svelte({
|
||||||
svelte({
|
emitCss: true,
|
||||||
emitCss: true,
|
}),
|
||||||
}),
|
],
|
||||||
],
|
css: {
|
||||||
css: {
|
postcss,
|
||||||
postcss,
|
|
||||||
},
|
|
||||||
resolve: {
|
|
||||||
alias: {
|
|
||||||
"@budibase/shared-core": path.resolve(__dirname, "../shared-core/src"),
|
|
||||||
"@budibase/types": path.resolve(__dirname, "../types/src"),
|
|
||||||
},
|
},
|
||||||
},
|
resolve: {
|
||||||
|
alias: {
|
||||||
|
"@budibase/shared-core": path.resolve(__dirname, "../shared-core/src"),
|
||||||
|
"@budibase/types": path.resolve(__dirname, "../types/src"),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue