File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
packages/@nodepack/service/src/config Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -45,23 +45,25 @@ module.exports = (api, options) => {
45
45
. set ( 'exprContextCritical' , options . externals )
46
46
47
47
// External modules (default are modules in package.json deps)
48
- if ( options . externals ) {
48
+ if ( options . externals !== false ) {
49
49
if ( options . externals === true ) {
50
50
const nodeExternals = require ( 'webpack-node-externals' )
51
51
config . externals ( nodeExternals ( {
52
- whitelist : options . nodeExternalsWhitelist || [
52
+ whitelist : ( options . nodeExternalsWhitelist || [
53
53
/ \. ( e o t | w o f f | w o f f 2 | t t f | o t f ) $ / ,
54
54
/ \. ( s v g | p n g | j p g | j p e g | g i f | i c o | w e b m ) $ / ,
55
55
/ \. ( m p 4 | m p 3 | o g g | s w f | w e b p ) $ / ,
56
56
/ \. ( c s s | s c s s | s a s s | l e s s | s t y l ) $ / ,
57
- ] ,
57
+ ] ) . concat ( [ '@nodepack/module' ] ) ,
58
58
modulesFromFile : true ,
59
59
} ) )
60
60
} else if ( Array . isArray ( options . externals ) ) {
61
- config . externals ( options . externals )
61
+ config . externals ( options . externals . concat ( [ '@nodepack/module' ] ) )
62
62
} else {
63
- config . externals ( [ options . externals ] )
63
+ config . externals ( [ options . externals , '@nodepack/module' ] )
64
64
}
65
+ } else {
66
+ config . externals ( [ '@nodepack/module' ] )
65
67
}
66
68
67
69
// Plugins
You can’t perform that action at this time.
0 commit comments