File tree Expand file tree Collapse file tree 2 files changed +13
-4
lines changed
Expand file tree Collapse file tree 2 files changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -90,9 +90,17 @@ module.exports = function unifiedExtend(api, opts) {
9090 } ) ;
9191 }
9292
93- webpackChain
94- . plugin ( pname )
95- . use ( HTMLPlugin , [ htmlOpts ] ) ;
93+ if ( ! webpackChain . plugins . has ( pname ) ) {
94+ webpackChain
95+ . plugin ( pname )
96+ . use ( HTMLPlugin , [ htmlOpts ] ) ;
97+ } else {
98+ webpackChain
99+ . plugin ( pname )
100+ . tap ( args => {
101+ return [ Object . assign ( { } , args [ 0 ] || { } , htmlOpts ) ] ;
102+ } ) ;
103+ }
96104 } ) ;
97105 } else {
98106 api . logger . warn ( '[webpack]' , 'Not Found "html-webpack-plugin"' ) ;
Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ module.exports = function unifiedExtend(api, opts) {
3232 loader : require . resolve ( 'file-loader' ) ,
3333 options : {
3434 name : genAssetSubPath ( dir ) ,
35+ esModule : false ,
3536 } ,
3637 } ,
3738 } ;
@@ -42,7 +43,7 @@ module.exports = function unifiedExtend(api, opts) {
4243 . test ( / \. ( p n g | j p e ? g | g i f | w e b p ) ( \? .* ) ? $ / )
4344 . use ( 'url-loader' )
4445 . loader ( require . resolve ( 'url-loader' ) )
45- . options ( genUrlLoaderOptions ( 'images ' ) ) ;
46+ . options ( genUrlLoaderOptions ( 'img ' ) ) ;
4647
4748
4849 // do not base64-inline SVGs.
You can’t perform that action at this time.
0 commit comments