File tree Expand file tree Collapse file tree
src/built-in-plugins/command-build/plugin Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -39,15 +39,17 @@ export const buildProject = async (opts: IOpts = {}) => {
3939 outFileName : '[name].js' ,
4040 publicPath : opts . publicPath , // If unset, use config value.
4141 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+ }
5153 return config ;
5254 } ,
5355 } ) ;
You can’t perform that action at this time.
0 commit comments