File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -7,11 +7,16 @@ import eslintPlugin from "vite-plugin-eslint";
77import path from "path" ;
88import { nodePolyfills } from "vite-plugin-node-polyfills" ;
99import compress from "vite-plugin-compress" ;
10+ import { builtinModules } from "module" ;
1011
1112dns . setDefaultResultOrder ( "verbatim" ) ;
1213
1314const __filename = fileURLToPath ( import . meta. url ) ;
1415const __dirname = path . dirname ( __filename ) ;
16+ const allExternal = [
17+ ...builtinModules ,
18+ ...builtinModules . map ( ( m ) => `node:${ m } ` )
19+ ] ;
1520
1621export default defineConfig ( {
1722 base : "./" ,
@@ -69,10 +74,8 @@ export default defineConfig({
6974 output : {
7075 dir : "dist" ,
7176 format : "es"
72- }
73- } ,
74- optimizeDeps : {
75- exclude : [ "jsonToGraphQLQuery" ]
77+ } ,
78+ exclude : [ "jsonToGraphQLQuery" , ...allExternal ]
7679 }
7780 }
7881} ) ;
You can’t perform that action at this time.
0 commit comments