Skip to content

Commit

Permalink
fix: 修改 style 输出原生的处理
Browse files Browse the repository at this point in the history
  • Loading branch information
Blackgan3 committed Jan 31, 2024
1 parent da72d93 commit b86f6a5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/webpack-plugin/lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1431,7 +1431,7 @@ try {
}
createData.resource = addQuery(createData.resource, { mpx: MPX_PROCESSED_FLAG }, true)
}

// TODO loader 顺序有待调整
if (mpx.mode === 'web') {
const mpxStyleOptions = queryObj.mpxStyleOptions
const firstLoader = loaders[0] ? toPosix(loaders[0].loader) : ''
Expand Down
6 changes: 5 additions & 1 deletion packages/webpack-plugin/lib/json-compiler/helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,11 @@ module.exports = function createJSONHelper ({ loaderContext, emitWarning, custom
}
}
if (ext === '.js' && mode === 'web') {
resource = `!!@vue/vue-loader-v15!${nativeLoaderPath}!${resource}`
if (mode === 'web') {
resource = `!!@vue/vue-loader-v15!${nativeLoaderPath}!${resource}`
} else {
resource = `!!${nativeLoaderPath}!${resource}`
}
}

const entry = getDynamicEntry(resource, 'component', outputPath, tarRoot, relativePath)
Expand Down

0 comments on commit b86f6a5

Please sign in to comment.