迁移到Webpack 4时出错。接收错误:Chunk.parents

我正在从“ webpack”:“ ^ 3.8.1”迁移到“ webpack”:“ ^ 4.41.2”

收到此错误。我已经从CommonsChunkPlugin迁移到SplitChunksPlugin。

ERROR in   Error: Chunk.parents: Use ChunkGroup.getParents() instead

  - Chunk.js:844 Chunk.get
    [order-platform]/[webpack]/lib/Chunk.js:844:9

  - index.js:40 doesChunkBelongToHTML
    [order-platform]/[preload-webpack-plugin]/index.js:40:30

  - index.js:116 extractedChunks.filter.chunk
    [order-platform]/[preload-webpack-plugin]/index.js:116:61

  - Array.filter

  - index.js:116 compilation.plugin
    [order-platform]/[preload-webpack-plugin]/index.js:116:45


  - new Promise


  - Hook.js:154 AsyncSeriesWaterfallHook.lazyCompileHook
    [order-platform]/[tapable]/lib/Hook.js:154:20

  - index.js:673 
    [order-platform]/[html-webpack-plugin]/index.js:673:47

  - index.js:178 Promise.resolve.then.then.then.then.then.then.html
    [order-platform]/[html-webpack-plugin]/index.js:178:18
fszxg 回答:迁移到Webpack 4时出错。接收错误:Chunk.parents

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/3130998.html

大家都在问