File tree 1 file changed +11
-9
lines changed
src/built-in-plugins/command-build/plugin
1 file changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -39,15 +39,17 @@ export const buildProject = async (opts: IOpts = {}) => {
39
39
outFileName : '[name].js' ,
40
40
publicPath : opts . publicPath , // If unset, use config value.
41
41
pipeConfig : async config => {
42
- staticHtmlPaths . forEach ( staticHtmlPath => {
43
- config . plugins . push (
44
- new HtmlWebpackPlugin ( {
45
- title : pri . sourceConfig . title || globalState . projectRootPath . split ( path . sep ) . pop ( ) ,
46
- filename : staticHtmlPath ,
47
- template : path . join ( __dirname , '../../../../template-project.ejs' ) ,
48
- } ) ,
49
- ) ;
50
- } ) ;
42
+ if ( pri . sourceConfig . useHtmlTemplate ) {
43
+ staticHtmlPaths . forEach ( staticHtmlPath => {
44
+ config . plugins . push (
45
+ new HtmlWebpackPlugin ( {
46
+ title : pri . sourceConfig . title || globalState . projectRootPath . split ( path . sep ) . pop ( ) ,
47
+ filename : staticHtmlPath ,
48
+ template : path . join ( __dirname , '../../../../template-project.ejs' ) ,
49
+ } ) ,
50
+ ) ;
51
+ } ) ;
52
+ }
51
53
return config ;
52
54
} ,
53
55
} ) ;
You can’t perform that action at this time.
0 commit comments