Open
Conversation
# Conflicts: # packages/webpack-plugin/lib/index.js # packages/webpack-plugin/lib/json-compiler/helper.js # packages/webpack-plugin/lib/native-loader.js # packages/webpack-plugin/lib/platform/template/wx/index.js # packages/webpack-plugin/lib/web/processScript.js
hiyuki
reviewed
Feb 26, 2024
| }) | ||
| }, | ||
| methods: { | ||
| setData (data, callback) { |
hiyuki
reviewed
Feb 26, 2024
packages/webpack-plugin/lib/index.js
Outdated
| }) | ||
| } | ||
| } | ||
| if (queryObj.isNative && nativeLoaderIndex !== loaders.length - 1) { |
hiyuki
reviewed
Feb 26, 2024
| if (mode === 'web') { | ||
| resource = `${resource}?isNative=true` | ||
| } else { | ||
| resource = `!!${nativeLoaderPath}!${resource}?isNative=true` |
Collaborator
There was a problem hiding this comment.
统一在afterResolve中插入nativeLoader吧,这里统一加isNative Query就可以
hiyuki
reviewed
Feb 26, 2024
| componentPlaceholder = componentPlaceholder.concat(Object.values(json.componentPlaceholder)) | ||
| } | ||
|
|
||
| if (mode === 'web') { |
hiyuki
reviewed
Feb 26, 2024
| }, callback) | ||
| }, | ||
| (callback) => { | ||
| if (mode === 'web') { |
Collaborator
There was a problem hiding this comment.
只有template和json需要预读,且文件的支持类型需要保持一致
hiyuki
reviewed
Feb 26, 2024
| // 兼容处理处理ts-loader中watch-run/updateFile逻辑,直接跳过当前loader及后续的loader返回内容 | ||
| const pathExtname = path.extname(this.resourcePath) | ||
| if (!['.vue', '.mpx'].includes(pathExtname)) { | ||
| const { queryObj } = parseRequest(this.resource) |
hiyuki
reviewed
Feb 27, 2024
hiyuki
reviewed
Feb 27, 2024
| return | ||
| } | ||
| Object.keys(data).forEach(key => { | ||
| this[key] = data[key] |
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.
功能
支持原生组件跨平台输出H5
待补充