facilmap/server/vite.config.ts

30 wiersze
709 B
TypeScript

2023-11-06 02:22:33 +00:00
import { defineConfig } from "vite";
import dtsPlugin from "vite-plugin-dts";
import tsconfigPaths from "vite-tsconfig-paths";
2023-09-24 21:00:38 +00:00
export default defineConfig({
plugins: [
2024-04-15 02:01:48 +00:00
dtsPlugin({ rollupTypes: true, tsconfigPath: "./tsconfig.build.json" }),
tsconfigPaths({ loose: true })
2023-09-24 21:00:38 +00:00
],
build: {
2023-10-02 03:23:22 +00:00
sourcemap: false,
2023-09-24 21:00:38 +00:00
minify: false,
target: "esnext",
lib: {
2024-04-03 19:05:53 +00:00
entry: './src/index.ts',
2023-09-24 21:00:38 +00:00
name: 'facilmap-server',
fileName: () => 'facilmap-server.mjs',
formats: ['es']
},
rollupOptions: {
external: (id) => (
!id.startsWith("./")
&& !id.startsWith("../")
&& /* resolved internal modules */ !id.startsWith("/")
2023-12-24 11:36:29 +00:00
&& !["facilmap-types", "facilmap-utils"].includes(id)
)
2023-09-24 21:00:38 +00:00
}
}
});