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