diff --git a/package.json b/package.json index 780892e0..019621e9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pri", - "version": "4.3.10", + "version": "4.3.11", "types": "src/node/index.ts", "main": "built/node/index.js", "scripts": { diff --git a/src/built-in-plugins/command-build/plugin/build.ts b/src/built-in-plugins/command-build/plugin/build.ts index c2d7fa30..f328a189 100644 --- a/src/built-in-plugins/command-build/plugin/build.ts +++ b/src/built-in-plugins/command-build/plugin/build.ts @@ -39,15 +39,17 @@ export const buildProject = async (opts: IOpts = {}) => { outFileName: '[name].js', publicPath: opts.publicPath, // If unset, use config value. pipeConfig: async config => { - staticHtmlPaths.forEach(staticHtmlPath => { - config.plugins.push( - new HtmlWebpackPlugin({ - title: pri.sourceConfig.title || globalState.projectRootPath.split(path.sep).pop(), - filename: staticHtmlPath, - template: path.join(__dirname, '../../../../template-project.ejs'), - }), - ); - }); + if (pri.sourceConfig.useHtmlTemplate) { + staticHtmlPaths.forEach(staticHtmlPath => { + config.plugins.push( + new HtmlWebpackPlugin({ + title: pri.sourceConfig.title || globalState.projectRootPath.split(path.sep).pop(), + filename: staticHtmlPath, + template: path.join(__dirname, '../../../../template-project.ejs'), + }), + ); + }); + } return config; }, }); diff --git a/src/utils/ts-plus-babel.ts b/src/utils/ts-plus-babel.ts index 4bd1b8e5..4949d3b5 100644 --- a/src/utils/ts-plus-babel.ts +++ b/src/utils/ts-plus-babel.ts @@ -66,7 +66,7 @@ const buildSass = (wholeProject: boolean, sourcePath: string) => { (options, fn) => { return fn(options); }, - {includePaths: path.join(pri.projectRootPath, 'node_modules')}, + { includePaths: path.join(pri.projectRootPath, 'node_modules') }, ), ), ); @@ -80,7 +80,7 @@ const buildLess = (wholeProject: boolean, sourcePath: string) => { (options, fn) => { return fn(options); }, - {paths: [path.join(pri.projectRootPath, 'node_modules', 'includes')]}, + { paths: [path.join(pri.projectRootPath, 'node_modules', 'includes')] }, ), ), );