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-04-07 16:39:59 +00:00
|
|
|
import iconsPlugin from "./rollup-icons";
|
|
|
|
|
|
|
|
export default defineConfig({
|
|
|
|
plugins: [
|
|
|
|
cssInjectedByJsPlugin(),
|
2023-10-06 23:13:51 +00:00
|
|
|
dtsPlugin({ rollupTypes: true, clearPureImport: false }),
|
2023-04-07 16:39:59 +00:00
|
|
|
autoExternalPlugin(),
|
|
|
|
iconsPlugin()
|
|
|
|
],
|
|
|
|
build: {
|
|
|
|
sourcemap: true,
|
|
|
|
minify: false,
|
|
|
|
lib: {
|
|
|
|
entry: './src/index.ts',
|
2023-10-02 03:23:22 +00:00
|
|
|
name: 'facilmap-leaflet',
|
|
|
|
fileName: () => 'facilmap-leaflet.mjs',
|
2023-04-07 16:39:59 +00:00
|
|
|
formats: ['es']
|
|
|
|
}
|
|
|
|
},
|
|
|
|
resolve: {
|
|
|
|
alias: {
|
|
|
|
'facilmap-leaflet': './src/index.ts'
|
|
|
|
}
|
2023-10-30 00:14:54 +00:00
|
|
|
},
|
|
|
|
test: {
|
|
|
|
environment: 'happy-dom'
|
2023-04-07 16:39:59 +00:00
|
|
|
}
|
|
|
|
});
|