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 vitePluginRequire from 'vite-plugin-require';
|
||||||
import { viteStaticCopy } from 'vite-plugin-static-copy';
|
import { viteStaticCopy } from 'vite-plugin-static-copy';
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig(({ command }) => ({
|
||||||
build: {
|
build: {
|
||||||
assetsDir: 'packs',
|
assetsDir: 'packs',
|
||||||
assetsInlineLimit: 0,
|
assetsInlineLimit: 0,
|
||||||
|
@ -29,6 +29,9 @@ export default defineConfig({
|
||||||
server: {
|
server: {
|
||||||
port: 3036,
|
port: 3036,
|
||||||
},
|
},
|
||||||
|
optimizeDeps: {
|
||||||
|
exclude: command === 'serve' ? ['@soapbox.pub/wasmboy'] : [],
|
||||||
|
},
|
||||||
plugins: [
|
plugins: [
|
||||||
checker({ typescript: true }),
|
checker({ typescript: true }),
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
|
@ -100,7 +103,7 @@ export default defineConfig({
|
||||||
environment: 'jsdom',
|
environment: 'jsdom',
|
||||||
setupFiles: 'src/jest/test-setup.ts',
|
setupFiles: 'src/jest/test-setup.ts',
|
||||||
},
|
},
|
||||||
});
|
}));
|
||||||
|
|
||||||
/** Return file as string, or return empty string if the file isn't found. */
|
/** Return file as string, or return empty string if the file isn't found. */
|
||||||
function readFileContents(path: string) {
|
function readFileContents(path: string) {
|
||||||
|
|
Loading…
Reference in a new issue