Skip to content
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

fix(h5): 修复 H5 loader 和 component rollup 配置问题 #13575

Merged
merged 2 commits into from
Apr 4, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion packages/taro-components-library-react/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ const config = {
treeshake: false,
plugins: [
externals({
devDeps: false
devDeps: false,
include: /^react/
}),
resolve({
preferBuiltins: false,
Expand Down
2 changes: 1 addition & 1 deletion packages/taro-loader/src/h5.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export default function (this: webpack.LoaderContext<any>) {

const pathDirname = dirname(this.resourcePath)
const pageName = isMultiRouterMode ? join(pathDirname, options.filename).replace(options.sourceDir + '/', '') : ''
const pages: Map<string, string> = options.pages
const pages: Map<string, string> = new Map(options.pages)
const pxTransformConfig = options.pxTransformConfig
const runtimePath = Array.isArray(options.runtimePath) ? options.runtimePath : [options.runtimePath]
let setReconcilerPost = ''
Expand Down