Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

配置多页应用 pages,当入口多时无法编译 #2318

Closed
itxuye opened this issue Aug 22, 2018 · 2 comments
Closed

配置多页应用 pages,当入口多时无法编译 #2318

itxuye opened this issue Aug 22, 2018 · 2 comments

Comments

@itxuye
Copy link

itxuye commented Aug 22, 2018

Version

3.0.1

Reproduction link

https://cli.vuejs.org/config/#pages

Node and OS info

Node >=8.11.3

Steps to reproduce

const fs = require('fs');
const path = require('path');
const MOD_PATH = path.resolve(__dirname, './src/views');
const files = fs.readdirSync(MOD_PATH);

const pages = {};
files.forEach(file => {
  if (file.indexOf('.') !== 0) {
    pages[file] = {
      entry: `src/views/${file}/index.ts`,
      template: 'public/index.html',
      filename: `${file}/index.html`
    };
  }
});

设置入口如上,然后当views目录下入口超过5个时,无法编译,编译卡在开始进度

What is expected?

正常编译

What is actually happening?

无法编译

@zaxlct
Copy link

zaxlct commented Aug 22, 2018

刚刚也遇到了这个问题,一旦超过 6 个,build 会一直卡着不动,改为 5 个后正常

@haoqunjiang
Copy link
Member

Duplicate of #1996 (comment)


暂时可以通过禁用 named-chunks plugin 解决

module.exports = {
  // ...
  chainWebpack: config => config.plugins.delete('named-chunks')
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants