File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change 11const { merge } = require ( 'webpack-merge' ) ;
22const webpackCommon = require ( './common.config' ) ;
33const path = require ( 'path' ) ;
4+ const CopyWebpackPlugin = require ( 'copy-webpack-plugin' ) ;
45
56delete webpackCommon . output ; // overwrite
67
8+ const outputPath = path . resolve ( __dirname , '../lib' ) ;
9+
710module . exports = merge ( webpackCommon , {
811 mode : 'production' ,
912
@@ -16,14 +19,23 @@ module.exports = merge(webpackCommon, {
1619
1720 output : {
1821 filename : '[name].js' ,
19- path : path . resolve ( __dirname , '../lib' ) ,
22+ path : outputPath ,
2023 chunkFilename : '[name].js' ,
2124 publicPath : '' ,
2225 library : {
2326 type : 'module'
2427 }
2528 } ,
2629
30+ plugins : [
31+ new CopyWebpackPlugin ( {
32+ patterns : [ {
33+ from : path . resolve ( __dirname , '../src/config/profiles' ) ,
34+ to : `${ outputPath } /profiles`
35+ } ]
36+ } )
37+ ] ,
38+
2739 experiments : {
2840 outputModule : true
2941 }
You can’t perform that action at this time.
0 commit comments