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

项目从vue-cli2.x迁移,导致崩溃 #1351

Closed
wwh0219 opened this issue May 23, 2018 · 5 comments
Closed

项目从vue-cli2.x迁移,导致崩溃 #1351

wwh0219 opened this issue May 23, 2018 · 5 comments

Comments

@wwh0219
Copy link

wwh0219 commented May 23, 2018

Version

3.0.0-beta.11

Reproduction link

jantimon/html-webpack-plugin#870

Steps to reproduce

与上面的html-webpack-plugin中的issue可能是同样的问题

What is expected?

92% after chunk asset optimization SourceMapDevToolPlugin 40.js attach SourceMap
94% after seal
95% emitting HtmlWebpackPluginD:\WorkSpace\devweb\node_modules\toposort\index.js:35
throw new Error('Cyclic dependency' nodeRep)
^

Error: Cyclic dependency
at visit (D:\WorkSpace\devweb\node_modules\toposort\index.js:35:13)
at visit (D:\WorkSpace\devweb\node_modules\toposort\index.js:53:9)
at visit (D:\WorkSpace\devweb\node_modules\toposort\index.js:53:9)
at Function.toposort [as array] (D:\WorkSpace\devweb\node_modules\toposort\index.js:22:22)
at Object.module.exports.dependency (D:\WorkSpace\devweb\node_modules\html-webpack-plugin\lib\chunksorter.js:50:35)
at HtmlWebpackPlugin.sortChunks (D:\WorkSpace\devweb\node_modules\html-webpack-plugin\index.js:364:35)
at D:\WorkSpace\devweb\node_modules\html-webpack-plugin\index.js:113:21
at AsyncSeriesHook.eval [as callAsync] (eval at create (D:\WorkSpace\devweb\node_modules\tapable\lib\HookCodeFactory.js:24:12), :12:1)
at AsyncSeriesHook.lazyCompileHook [as _callAsync] (D:\WorkSpace\devweb\node_modules\tapable\lib\Hook.js:35:21)
at Compiler.emitAssets (D:\WorkSpace\devweb\node_modules\webpack\lib\Compiler.js:307:19)
at onCompiled (D:\WorkSpace\devweb\node_modules\webpack\lib\Watching.js:50:19)
at hooks.afterCompile.callAsync.err (D:\WorkSpace\devweb\node_modules\webpack\lib\Compiler.js:487:14)
at AsyncSeriesHook.eval [as callAsync] (eval at create (D:\WorkSpace\devweb\node_modules\tapable\lib\HookCodeFactory.js:24:12), :15:1)
at AsyncSeriesHook.lazyCompileHook [as _callAsync] (D:\WorkSpace\devweb\node_modules\tapable\lib\Hook.js:35:21)
at compilation.seal.err (D:\WorkSpace\devweb\node_modules\webpack\lib\Compiler.js:484:30)
at AsyncSeriesHook.eval [as callAsync] (eval at create (D:\WorkSpace\devweb\node_modules\tapable\lib\HookCodeFactory.js:24:12), :9:1)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

进程完成,退出码 1

What is actually happening?

程序无法运行


在vue.config.js中修改html-webpack-plugin的chunksSortMode参数为‘none’后程序正常运行

@yyx990803
Copy link
Member

This is not a Vue CLI issue.

@ckken
Copy link

ckken commented May 25, 2018

same issue how can i fixed it

@GodStream
Copy link

求助 vue.config.js 里 html-webpack-plugin 配置是怎样修改的?
@gaarashura

@transtone
Copy link

transtone commented Jun 8, 2018

@GodStream
https://github.com/vuejs/vue-cli/blob/dev/docs/guide/webpack.md

// vue.config.js
module.exports = {
  chainWebpack: config => {
    config
      .plugin('html')
      .tap(args => {
          args[0].chunksSortMode = "none"
          return args
      })
  }

@GodStream
Copy link

@transtone
当天已经找到配置方式了,不过还是感谢回复

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

5 participants