8000 增加对 webpack5 的支持 by linpengteng · Pull Request #114 · hzsrc/webpack-theme-color-replacer · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

增加对 webpack5 的支持 #114

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

Merged
merged 4 commits into from
Dec 14, 2022
Merged

增加对 webpack5 的支持 #114

merged 4 commits into from
Dec 14, 2022

Conversation

linpengteng
Copy link
Contributor

当 webpack 版本 >= 5 时,使用 compilation.hooks.processAssets 和 compilation.emitAsset Api 以实现 Webpack5 的支持

@hzsrc hzsrc merged commit 2b250b3 into hzsrc:master Dec 14, 2022
@hzsrc
Copy link
Owner
hzsrc commented Dec 14, 2022

Good job!

@hzsrc
Copy link
Owner
hzsrc commented Dec 14, 2022

你好!我测试了下,有点小问题,就是这里injectToHtml配置为false或不配置时,

image
会报错:

TypeError: item.node is not a function
    at D:\hz\npm\vue-element-ui-scaffold-webpack4\node_modules\webpack-sources\lib\ConcatSource.js:59:50
    at Array.map (<anonymous>)
    at ConcatSource.node (D:\hz\npm\vue-element-ui-scaffold-webpack4\node_modules\webpack-sources\lib\ConcatSource.js:58:63)

推测是这个地方产生了冲突,
image
看看有什么提示吗?
我用的这个代码测的:https://github.com/hzsrc/vue-element-ui-scaffold-webpack4.git

@linpengteng
Copy link
Contributor Author

好的,我这周看下

@hzsrc
Copy link
Owner
hzsrc commented Dec 16, 2022

我又研究了一下,解决了,目前没发现有问题。

@linpengteng
Copy link
Contributor Author

Good,之前是什么原因导致?

@hzsrc
Copy link
Owner
hzsrc commented Dec 21, 2022

CashedSource这个类没有node()方法导致报错了

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

Successfully merging this pull request may close these issues.

2 participants
0