File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed
Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -127,7 +127,8 @@ require('@vercel/ncc')('/path/to/input', {
127127 target: ' es2015' , // default
128128 v8cache: false , // default
129129 quiet: false , // default
130- debugLog: false // default
130+ debugLog: false , // default
131+ webpack : (config ) => config // default
131132}).then (({ code, map, assets }) => {
132133 console .log (code);
133134 // Assets is an object of asset file names to { source, permissions, symlinks }
Original file line number Diff line number Diff line change @@ -57,7 +57,8 @@ function ncc (
5757 production = true ,
5858 // webpack defaults to `module` and `main`, but that's
5959 // not really what node.js supports, so we reset it
60- mainFields = [ 'main' ]
60+ mainFields = [ 'main' ] ,
61+ webpack : extendWebpack = ( config ) => config ,
6162 } = { }
6263) {
6364 // v8 cache not supported for ES modules
@@ -252,7 +253,7 @@ function ncc (
252253 } ) ) ;
253254 }
254255
255- const compiler = webpack ( {
256+ const compiler = webpack ( extendWebpack ( {
256257 entry,
257258 cache : cache === false ? undefined : {
258259 type : "filesystem" ,
@@ -383,7 +384,7 @@ function ncc (
383384 } ,
384385 } ,
385386 plugins
386- } ) ;
387+ } ) ) ;
387388 compiler . outputFileSystem = mfs ;
388389 if ( ! watch ) {
389390 return new Promise ( ( resolve , reject ) => {
You can’t perform that action at this time.
0 commit comments