1
0
Fork 0
mirror of synced 2024-06-30 12:00:31 +12:00
budibase/packages/standard-components/vite.config.js
2021-08-04 17:25:53 +01:00

29 lines
605 B
JavaScript

import { svelte } from "@sveltejs/vite-plugin-svelte"
const path = require("path")
export default ({ mode }) => {
const isProduction = mode === "production"
return {
build: {
lib: {
entry: path.resolve(__dirname, "src/index.js"),
name: "standard-components",
formats: ["es"],
},
minify: isProduction,
},
plugins: [
svelte({
hot: !isProduction,
emitCss: true,
}),
],
resolve: {
dedupe: ["svelte", "svelte/internal"],
},
rollupOptions: {
external: ["svelte", "svelte/internal"],
},
}
}