File tree Expand file tree Collapse file tree 2 files changed +18
-3
lines changed Expand file tree Collapse file tree 2 files changed +18
-3
lines changed Original file line number Diff line number Diff line change @@ -43,7 +43,6 @@ let config = {
43
43
} ,
44
44
entry : {
45
45
'klaro' : path . join ( SRC_DIR , 'klaro.js' ) ,
46
- 'klaro-no-translations' : path . join ( SRC_DIR , 'klaro.js' ) ,
47
46
cm : path . join ( SRC_DIR , 'consent-manager.js' ) ,
48
47
translations : path . join ( SRC_DIR , 'translations.js' ) ,
49
48
ide : path . join ( SRC_DIR , 'ide.js' )
Original file line number Diff line number Diff line change 1
1
const { merge } = require ( 'webpack-merge' ) ;
2
+ const path = require ( 'path' ) ;
3
+ const SRC_DIR = path . resolve ( __dirname , 'src' ) ;
2
4
const baseConfig = require ( './webpack.base.js' ) ;
3
5
const prodConfig = require ( './webpack.prod.js' ) ;
4
6
const devConfig = require ( './webpack.dev.js' ) ;
5
7
6
8
module . exports = ( env , argv ) => {
7
9
switch ( argv . mode ) {
8
10
case 'development' :
9
- return merge ( baseConfig , devConfig ) ;
11
+ var config = merge ( baseConfig , devConfig ) ;
12
+ break ;
10
13
case 'production' :
11
- return merge ( baseConfig , prodConfig ) ;
14
+ var config = merge ( baseConfig , prodConfig ) ;
15
+ break ;
12
16
default :
13
17
throw new Error ( 'No matching configuration was found!' ) ;
14
18
}
19
+ // Create config2 for klaro-no-translations.
20
+ let config2 = {
21
+ ...config ,
22
+ entry : {
23
+ 'klaro-no-translations' : path . join ( SRC_DIR , 'klaro-no-translations.js' ) ,
24
+ } ,
25
+ output : {
26
+ ...config . output ,
27
+ library : 'klaro' ,
28
+ }
29
+ } ;
30
+ return [ config , config2 ] ;
15
31
} ;
You can’t perform that action at this time.
0 commit comments