File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -51,21 +51,14 @@ const GENERATE_STATS_FILES = config.options.generateStatsFiles;
5151const ENABLE_CACHING = isLocal ? config . options . caching : false ;
5252
5353// Handle "all" and "all-monorepo" option in externals
54- function computedExternals ( ) {
55- switch ( externals ) {
56- case "all" :
57- return [ nodeExternals ( ) ] ;
58-
59- case "all-monorepo" :
60- return [ nodeExternals ( { additionalModuleDirs : [ path . resolve ( process . cwd ( ) , "../../node_modules" ) ] } ) ] ;
61-
62- default :
63- return externals ;
64- }
65- }
66-
6754// And add the forceExclude packages to it because they shouldn't be Webpacked
68- const computedExternals = computedExternals ( ) . concat ( forceExclude ) ;
55+ const computedExternals = (
56+ externals === "all"
57+ ? [ nodeExternals ( ) ]
58+ : externals === "all-monorepo"
59+ ? [ nodeExternals ( { additionalModuleDirs : [ path . resolve ( process . cwd ( ) , "../../node_modules" ) ] } ) ]
60+ : externals
61+ ) . concat ( forceExclude ) ;
6962
7063const extensions = [
7164 ".wasm" ,
You can’t perform that action at this time.
0 commit comments