Open
Conversation
17 tasks
ItsRyanWu
suggested changes
Apr 21, 2023
Contributor
ItsRyanWu
left a comment
There was a problem hiding this comment.
这么做无法兼容 webpack v4 因为 v4 没有 import { sources } from 'webpack' 中 sources 这个对象,当初就是因为考虑到这个才引入了 webpack-sources 且仅会在 webpack v4 时使用,v5 时使用 webpack 内置的。目前我觉得我可以做的就是升级 webpack-sources。
Author
|
peer依赖吧? 如何? |
Contributor
可以请教下为什么 peerDependencies 可以解决问题吗?另外还有一点比较疑惑,当 webpack 版本为 v5 时程序会自动使用 webpack 内的 sources 对象而非 webpack-sources 库里的,如果是这样的话问题为什么会发生呢? |
Author
因为Taro那边可能也是为了考虑webpack4的兼容, 导致版本冲突, 因为这样 #72 (comment) 是可以解决的 peerDependencies 依赖的话也要比较新才行. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
webpack-sources;github:dcasia/digital-creative-eslint-pluginnot founded.ref: #62 #72