aboutsummaryrefslogtreecommitdiff
path: root/web/pw-frontend/vite.config.js
diff options
context:
space:
mode:
authorIlion Beyst <ilion.beyst@gmail.com>2021-12-23 18:22:14 +0100
committerIlion Beyst <ilion.beyst@gmail.com>2021-12-23 18:22:14 +0100
commitc26f72890f934d654742328702661f0bd73b7582 (patch)
treecdd1fa595c1fce56ae1efbe2e3392045dd6c0bb0 /web/pw-frontend/vite.config.js
parent96ee00242f350b391dcc1cf4d72a442c969f565e (diff)
downloadplanetwars.dev-c26f72890f934d654742328702661f0bd73b7582.tar.xz
planetwars.dev-c26f72890f934d654742328702661f0bd73b7582.zip
fix frontend build
Diffstat (limited to 'web/pw-frontend/vite.config.js')
-rw-r--r--web/pw-frontend/vite.config.js14
1 files changed, 11 insertions, 3 deletions
diff --git a/web/pw-frontend/vite.config.js b/web/pw-frontend/vite.config.js
index 7682f94..bce1f51 100644
--- a/web/pw-frontend/vite.config.js
+++ b/web/pw-frontend/vite.config.js
@@ -1,12 +1,20 @@
import { defineConfig } from 'vite'
import { svelte } from '@sveltejs/vite-plugin-svelte'
-import nodePolyfills from 'rollup-plugin-polyfill-node'
-
+import { viteCommonjs } from '@originjs/vite-plugin-commonjs'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [
svelte(),
- nodePolyfills()
+ viteCommonjs({
+ transformMixedEsModules: true,
+ }),
],
+ build: {
+ commonjsOptions: {
+ transformMixedEsModules: true,
+ },
+ minify: false,
+ target: "modules",
+ },
})