File tree 3 files changed +14
-1
lines changed
3 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,11 @@ export interface CliConfig {
27
27
* Global scripts to be included in the build.
28
28
*/
29
29
scripts ?: string [ ] ;
30
+ /**
31
+ * Global scripts to be used internally.
32
+ * See https://webpack.github.io/docs/library-and-externals.html
33
+ */
34
+ externals : { [ name : string ] : string } ;
30
35
/**
31
36
* Name and corresponding file for environment config.
32
37
*/
Original file line number Diff line number Diff line change 69
69
},
70
70
"additionalProperties" : false
71
71
},
72
+ "externals" : {
73
+ "description" : " Global scripts to be used internally." ,
74
+ "type" : " object" ,
75
+ "additionalProperties" : true
76
+ },
72
77
"environments" : {
73
78
"description" : " Name and corresponding file for environment config." ,
74
79
"type" : " object" ,
141
146
}
142
147
},
143
148
"additionalProperties" : false
144
- }
149
+ }
Original file line number Diff line number Diff line change @@ -23,6 +23,8 @@ export function getWebpackCommonConfig(
23
23
const scripts = appConfig . scripts
24
24
? appConfig . scripts . map ( ( script : string ) => path . resolve ( appRoot , script ) )
25
25
: [ ] ;
26
+ const externals = appConfig . externals || [ ] ;
27
+
26
28
const lazyModules = findLazyModules ( appRoot ) ;
27
29
28
30
let entry : { [ key : string ] : string [ ] } = {
@@ -45,6 +47,7 @@ export function getWebpackCommonConfig(
45
47
path : path . resolve ( projectRoot , appConfig . outDir ) ,
46
48
filename : '[name].bundle.js'
47
49
} ,
50
+ externals : externals ,
48
51
module : {
49
52
preLoaders : [
50
53
{
You can’t perform that action at this time.
0 commit comments