mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-18 11:36:36 +00:00
27 lines
626 B
JavaScript
27 lines
626 B
JavaScript
import { defineConfig } from "vite";
|
|
import { svelte } from "@sveltejs/vite-plugin-svelte";
|
|
import { readFile } from "fs/promises";
|
|
|
|
const pkg = JSON.parse(
|
|
await readFile(new URL("./package.json", import.meta.url))
|
|
);
|
|
|
|
/**
|
|
* @type {import('vite').UserConfig}
|
|
*/
|
|
const config = defineConfig({
|
|
plugins: [svelte({ emitCss: false })],
|
|
build: {
|
|
lib: { name: pkg.name, entry: "src" },
|
|
rollupOptions: {
|
|
external: Object.keys(pkg.dependencies),
|
|
output: {
|
|
dir: "lib",
|
|
inlineDynamicImports: true,
|
|
globals: { flatpickr: "flatpickr" },
|
|
},
|
|
},
|
|
},
|
|
});
|
|
|
|
export default config;
|