akfun 1.6.2 → 1.6.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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/build2esm.js +3 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "akfun",
3
- "version": "1.6.2",
3
+ "version": "1.6.3",
4
4
  "description": "前端脚手架:支持Vue技术栈和react技术栈",
5
5
  "keywords": [
6
6
  "前端工程",
package/src/build2esm.js CHANGED
@@ -7,12 +7,12 @@ const { isArray, isObject } = require('./utils/typeof');
7
7
  const {curConsoleTag } = require("./utils/akfunParams");
8
8
  const deepMergeConfig = require('./utils/deepMergeConfig');
9
9
 
10
- async function build2esmFunc(options) {
10
+ async function build2esmFunc(options, curConfig) {
11
11
  // create a bundle
12
12
  const bundle = await rollup.rollup({
13
13
  input: options.input,
14
14
  /** 直接使用webpack中的externals配置(避免再新增一个rollup对应的配置,增加用户的配置复杂度) */
15
- external: config.webpack.externals,
15
+ external: curConfig.webpack.externals,
16
16
  plugins: options.plugins
17
17
  });
18
18
 
@@ -43,7 +43,7 @@ module.exports = function (fileName, akfunConfig, _consoleTag) {
43
43
  if (build2esm && build2esm.output) {
44
44
  curRollupConfig.output = build2esm.output;
45
45
  }
46
- build2esmFunc(curRollupConfig).then(() => {
46
+ build2esmFunc(curRollupConfig, config).then(() => {
47
47
  spinner.succeed(`${consoleTag}esm lib库构建完成`);
48
48
  });
49
49
  };