fix(frontend): add type=module and svelte-preprocess to fix ESM build

This commit is contained in:
2026-06-29 15:46:30 -04:00
parent 931ad6c11b
commit 59fce91714
2 changed files with 11 additions and 4 deletions
+2
View File
@@ -2,6 +2,7 @@
"name": "hiveops-guide-frontend", "name": "hiveops-guide-frontend",
"version": "1.0.0", "version": "1.0.0",
"private": true, "private": true,
"type": "module",
"scripts": { "scripts": {
"dev": "vite", "dev": "vite",
"build": "vite build", "build": "vite build",
@@ -13,6 +14,7 @@
"@tsconfig/svelte": "^5.0.0", "@tsconfig/svelte": "^5.0.0",
"svelte": "^4.0.0", "svelte": "^4.0.0",
"svelte-check": "^3.0.0", "svelte-check": "^3.0.0",
"svelte-preprocess": "^5.0.0",
"typescript": "^5.0.0", "typescript": "^5.0.0",
"vite": "^5.0.0" "vite": "^5.0.0"
}, },
+9 -4
View File
@@ -1,8 +1,13 @@
import { defineConfig } from 'vite'; import { defineConfig } from 'vite'
import { svelte } from '@sveltejs/vite-plugin-svelte'; import { svelte } from '@sveltejs/vite-plugin-svelte'
import sveltePreprocess from 'svelte-preprocess'
export default defineConfig({ export default defineConfig({
plugins: [svelte()], plugins: [
svelte({
preprocess: sveltePreprocess({ typescript: true })
})
],
server: { port: 5188 }, server: { port: 5188 },
preview: { port: 5188 }, preview: { port: 5188 },
}); })