fix(frontend): add type=module and svelte-preprocess to fix ESM build
This commit is contained in:
@@ -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"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -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 },
|
||||||
});
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user