vite: don't optimize wasmboy in dev (fixes devserver)
This commit is contained in:
parent
3b17bef9e5
commit
33b2d19cd0
1 changed files with 5 additions and 2 deletions
|
@ -12,7 +12,7 @@ import { VitePWA } from 'vite-plugin-pwa';
|
|||
import vitePluginRequire from 'vite-plugin-require';
|
||||
import { viteStaticCopy } from 'vite-plugin-static-copy';
|
||||
|
||||
export default defineConfig({
|
||||
export default defineConfig(({ command }) => ({
|
||||
build: {
|
||||
assetsDir: 'packs',
|
||||
assetsInlineLimit: 0,
|
||||
|
@ -29,6 +29,9 @@ export default defineConfig({
|
|||
server: {
|
||||
port: 3036,
|
||||
},
|
||||
optimizeDeps: {
|
||||
exclude: command === 'serve' ? ['@soapbox.pub/wasmboy'] : [],
|
||||
},
|
||||
plugins: [
|
||||
checker({ typescript: true }),
|
||||
// @ts-ignore
|
||||
|
@ -100,7 +103,7 @@ export default defineConfig({
|
|||
environment: 'jsdom',
|
||||
setupFiles: 'src/jest/test-setup.ts',
|
||||
},
|
||||
});
|
||||
}));
|
||||
|
||||
/** Return file as string, or return empty string if the file isn't found. */
|
||||
function readFileContents(path: string) {
|
||||
|
|
Loading…
Reference in a new issue