From 5974ef3d0c953260bcd9019d8c035187066dda64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=B2=81=E6=A0=91=E4=BA=BA?= Date: Fri, 9 Jun 2023 01:00:57 +0100 Subject: [PATCH] fix: build issue with libparakeet --- src/dummy.mjs | 1 + vite.config.ts | 4 ++++ 2 files changed, 5 insertions(+) create mode 100644 src/dummy.mjs diff --git a/src/dummy.mjs b/src/dummy.mjs new file mode 100644 index 0000000..a7764dc --- /dev/null +++ b/src/dummy.mjs @@ -0,0 +1 @@ +// This is a dummy module for vite/rollup to resolve. diff --git a/vite.config.ts b/vite.config.ts index 604789d..e20f3fb 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -23,6 +23,9 @@ const version = `${pkg.version}-${shortCommit}`; // https://vitejs.dev/config/ export default defineConfig({ + worker: { + format: 'es', + }, server: { fs: { // Note: @@ -85,6 +88,7 @@ export default defineConfig({ resolve: { alias: { '~': path.resolve(__dirname, 'src'), + module: path.resolve(__dirname, 'src', 'dummy.mjs'), }, }, build: {