akfun 5.1.7 → 5.1.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "akfun",
3
- "version": "5.1.7",
3
+ "version": "5.1.8",
4
4
  "description": "前端脚手架:支持Vue技术栈和react技术栈",
5
5
  "keywords": [
6
6
  "前端工程",
@@ -12,10 +12,7 @@ const fileExists = function (fileDir) {
12
12
  module.exports = function (currentConfigDir) {
13
13
  let currentConfig = {};
14
14
  if (fileExists(currentConfigDir)) {
15
- const configObj = require(currentConfigDir);
16
- if (configObj) {
17
- currentConfig = configObj;
18
- }
15
+ currentConfig = require(currentConfigDir);
19
16
  }
20
17
  return currentConfig;
21
18
  };
@@ -96,12 +96,14 @@ module.exports = (akfunConfig) => {
96
96
  plugins: []
97
97
  });
98
98
 
99
- // 使用用户自定义的多入口配置,生产对应的多页面多模板
100
- const htmlWebpackPluginList = entrys2htmlWebpackPlugin(webpackProdConfig.entry, curHtmlTemplate);
99
+ if (!webpackProdConfig.closeHtmlWebpackPlugin) {
100
+ // 使用用户自定义的多入口配置,生产对应的多页面多模板
101
+ const htmlWebpackPluginList = entrys2htmlWebpackPlugin(webpackProdConfig.entry, curHtmlTemplate);
101
102
 
102
- htmlWebpackPluginList.forEach((htmlWebpackPlugin) => {
103
- webpackProdConfig.plugins.push(htmlWebpackPlugin);
104
- });
103
+ htmlWebpackPluginList.forEach((htmlWebpackPlugin) => {
104
+ webpackProdConfig.plugins.push(htmlWebpackPlugin);
105
+ });
106
+ }
105
107
 
106
108
  // 判断是否有public目录,如果有需要转移到dist目录下
107
109
  if (fs.existsSync(resolve('public'))) {