Skip to content

Commit

Permalink
feat: add worker plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
CurryYangxx committed May 8, 2024
1 parent 70baa46 commit 07f2fc5
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions packages/insomnia/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,17 @@ export default defineConfig(({ mode }) => {
}),
react(),
],
worker: {
plugins: [
electronNodeRequire({
modules: [
'electron',
...Object.keys(pkg.dependencies),
...builtinModules.filter(m => m !== 'buffer'),
...builtinModules.map(m => `node:${m}`),
],
}),
],
},
};
});

0 comments on commit 07f2fc5

Please sign in to comment.