akfun 5.3.1 → 5.3.3

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.3.1",
3
+ "version": "5.3.3",
4
4
  "description": "前端脚手架:支持Vue技术栈和react技术栈",
5
5
  "keywords": [
6
6
  "前端工程",
package/src/dev-server.js CHANGED
@@ -114,17 +114,20 @@ module.exports = function (akfunConfig, _consoleTag, callbackFunc) {
114
114
 
115
115
  let entryConfig = webpackConfig.entry || {}; // 获取构建入口配置
116
116
  const entryFiles = (entryConfig && Object.keys(entryConfig)) || [];
117
+ let firstAssetUrl = `${projPath}index.js`; // 首个构建入口配置
118
+
117
119
  if (entryFiles.length > 0) {
118
120
  // 获取第一个入口文件
119
121
  const filename = entryFiles[0];
120
122
  const consoleInfo = curEnvConfig.consoleInfo || '当前运行脚本';
123
+ firstAssetUrl = `${projPath}${filename}.js`;
121
124
 
122
125
  if (curEnvConfig.cssExtract || curEnvConfig.cssExtract === undefined) {
123
126
  console.info(
124
127
  `${consoleInfo}:\n ${projPath}${filename}.js\n当前可用样式[可能不存在]:\n${projPath}${filename}.css`
125
128
  );
126
129
  } else {
127
- console.info(`${consoleInfo}:\n ${projPath}${filename}.js`);
130
+ console.info(`${consoleInfo}:\n ${firstAssetUrl}`);
128
131
  }
129
132
  // 是否自动打开浏览器并跳转到第一个入口页面
130
133
  if (!curEnvConfig.closeHtmlWebpackPlugin && autoOpenBrowser) {
@@ -136,7 +139,7 @@ module.exports = function (akfunConfig, _consoleTag, callbackFunc) {
136
139
  if (callbackFunc) {
137
140
  callbackFunc({
138
141
  config: curEnvConfig,
139
- url: uri,
142
+ url: firstAssetUrl,
140
143
  port: port
141
144
  });
142
145
  }