2024-03-09 04:25:26 +00:00
|
|
|
/// <reference types="vitest" />
|
2023-11-06 02:22:33 +00:00
|
|
|
import { defineConfig } from "vite";
|
|
|
|
import dtsPlugin from "vite-plugin-dts";
|
2024-03-16 00:02:32 +00:00
|
|
|
import tsconfigPaths from "vite-tsconfig-paths";
|
2023-09-24 21:00:38 +00:00
|
|
|
|
|
|
|
export default defineConfig({
|
|
|
|
plugins: [
|
2024-03-16 00:02:32 +00:00
|
|
|
tsconfigPaths({ loose: true }),
|
2024-04-15 02:01:48 +00:00
|
|
|
dtsPlugin({ rollupTypes: true, tsconfigPath: "./tsconfig.build.json" })
|
2023-09-24 21:00:38 +00:00
|
|
|
],
|
|
|
|
build: {
|
|
|
|
sourcemap: true,
|
|
|
|
minify: false,
|
|
|
|
target: "esnext",
|
|
|
|
lib: {
|
|
|
|
entry: './src/index.ts',
|
|
|
|
name: 'facilmap-utils',
|
|
|
|
fileName: () => 'facilmap-utils.mjs',
|
|
|
|
formats: ['es']
|
2023-11-13 22:04:41 +00:00
|
|
|
},
|
|
|
|
rollupOptions: {
|
2024-03-09 03:46:43 +00:00
|
|
|
external: (id) => id.includes("/node_modules/") || (!id.startsWith("./") && !id.startsWith("../") && /* resolved internal modules */ !id.startsWith("/"))
|
2023-09-24 21:00:38 +00:00
|
|
|
}
|
2024-03-09 04:25:26 +00:00
|
|
|
},
|
|
|
|
test: {
|
|
|
|
server: {
|
|
|
|
deps: {
|
|
|
|
external: [/\/node_modules\//] // Temporary fix for https://discord.com/channels/917386801235247114/1215127757550260225
|
|
|
|
}
|
|
|
|
}
|
2023-09-24 21:00:38 +00:00
|
|
|
}
|
|
|
|
});
|