2023-11-06 02:22:33 +00:00
|
|
|
import { defineConfig } from "vite";
|
|
|
|
import cssInjectedByJsPlugin from "vite-plugin-css-injected-by-js";
|
|
|
|
import dtsPlugin from "vite-plugin-dts";
|
|
|
|
import autoExternalPlugin from "rollup-plugin-auto-external";
|
2023-10-02 03:23:22 +00:00
|
|
|
|
|
|
|
export default defineConfig(({ mode }) => ({
|
|
|
|
plugins: [
|
|
|
|
cssInjectedByJsPlugin(),
|
|
|
|
dtsPlugin({ rollupTypes: true }),
|
|
|
|
autoExternalPlugin(),
|
|
|
|
],
|
|
|
|
build: {
|
|
|
|
sourcemap: true,
|
|
|
|
minify: false,
|
|
|
|
lib: {
|
2023-10-06 23:13:51 +00:00
|
|
|
entry: './src/lib/index.ts',
|
2023-10-02 03:23:22 +00:00
|
|
|
name: 'facilmap-frontend',
|
|
|
|
fileName: () => 'facilmap-frontend.mjs',
|
|
|
|
formats: ['es']
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}));
|