diff vite.config.ts @ 7:fd73907cef40

project upgrades: pdm, pnpm, vite, nginx router
author drewp@bigasterisk.com
date Fri, 25 Nov 2022 20:31:00 -0800
parents
children bfd95926be6e
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/vite.config.ts	Fri Nov 25 20:31:00 2022 -0800
@@ -0,0 +1,31 @@
+import { defineConfig } from "vite";
+
+export default defineConfig({
+  base: "https://bigasterisk.com/collector/",
+  logLevel: "warn",
+  server: {
+    host: "0.0.0.0",
+    strictPort: true,
+    port: 8002,
+    hmr: { path: "vite-ws" },
+    fs: { allow: ["src", "node_modules", "."] },
+  },
+  build: {
+    assetsDir: "src",
+    target: "esnext",
+    lib: {
+      entry: "src/index.ts",
+      formats: ["es"],
+    },
+    rollupOptions: {
+      // input: { app: "src/index.html" },
+      external: /^lit/,
+    },
+  },
+  resolve: {
+    alias: [{ find: "rdf-canonize-native", replacement: "" }],
+  },
+  define: {
+    global: {},
+  },
+});