Skip to content

Commit

Permalink
fix: worker build
Browse files Browse the repository at this point in the history
  • Loading branch information
CurryYangxx committed May 13, 2024
1 parent b16c98a commit df2cb91
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/insomnia/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ export default defineConfig(({ mode }) => {
},
optimizeDeps: {
exclude: ['@getinsomnia/node-libcurl'],
// these packages are only used in web worker, Vite won't be able to discover the import on the initial scan,so we need to include them here to let vite pre-bundle them
// https://vitejs.dev/guide/dep-pre-bundling.html#customizing-the-behavior
include: ['@stoplight/spectral-core', '@stoplight/spectral-ruleset-bundler/with-loader', '@stoplight/spectral-rulesets'],
},
plugins: [
// Allows us to import modules that will be resolved by Node's require() function.
Expand Down

0 comments on commit df2cb91

Please sign in to comment.