akfun 1.6.3 → 1.6.5

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 +4 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "akfun",
3
- "version": "1.6.3",
3
+ "version": "1.6.5",
4
4
  "description": "前端脚手架:支持Vue技术栈和react技术栈",
5
5
  "keywords": [
6
6
  "前端工程",
package/src/build2esm.js CHANGED
@@ -1,5 +1,6 @@
1
1
  const ora = require('ora');
2
2
  const rollup = require('rollup');
3
+ const nodeExternals = require('webpack-node-externals');
3
4
  const projectConfig = require('./config/index'); // 引入当前项目配置文件
4
5
  const defaultConfig = require('./config/default.config');
5
6
  const rollupConfig = require('./config/rollup.config'); // rollup的配置文件
@@ -12,7 +13,9 @@ async function build2esmFunc(options, curConfig) {
12
13
  const bundle = await rollup.rollup({
13
14
  input: options.input,
14
15
  /** 直接使用webpack中的externals配置(避免再新增一个rollup对应的配置,增加用户的配置复杂度) */
15
- external: curConfig.webpack.externals,
16
+ external: curConfig.webpack.ignoreNodeModules
17
+ ? [nodeExternals()].concat(curConfig.webpack.externals)
18
+ : curConfig.webpack.externals,
16
19
  plugins: options.plugins
17
20
  });
18
21