File tree 3 files changed +12
-0
lines changed
3 files changed +12
-0
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 74
74
},
75
75
"additionalProperties" : false
76
76
},
77
+ "externals" : {
78
+ "description" : " Global scripts to be used internally." ,
79
+ "type" : " object" ,
80
+ "additionalProperties" : true
81
+ },
77
82
"environments" : {
78
83
"description" : " Name and corresponding file for environment config." ,
79
84
"type" : " object" ,
Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ export function getWebpackCommonConfig(
22
22
const scripts = appConfig . scripts
23
23
? appConfig . scripts . map ( ( script : string ) => path . resolve ( appRoot , script ) )
24
24
: [ ] ;
25
+ const externals = appConfig . externals || { } ;
25
26
26
27
let entry : { [ key : string ] : string [ ] } = {
27
28
main : [ appMain ]
@@ -43,6 +44,7 @@ export function getWebpackCommonConfig(
43
44
path : path . resolve ( projectRoot , appConfig . outDir ) ,
44
45
filename : '[name].bundle.js'
45
46
} ,
47
+ externals : externals ,
46
48
module : {
47
49
rules : [
48
50
{
You can’t perform that action at this time.
0 commit comments