Skip to content

Commit

Permalink
fix: 修复使用 Webpack5 编译时组件渲染失败的问题,fix #20
Browse files Browse the repository at this point in the history
  • Loading branch information
Chen-jj committed Mar 29, 2023
1 parent 1d8dae7 commit 06f0150
Show file tree
Hide file tree
Showing 3 changed files with 1,277 additions and 1,084 deletions.
8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,13 @@
"url": "https://github.com/NervJS/taro-plugin-platform-alipay-dd/issues"
},
"peerDependencies": {
"@tarojs/shared": "^3.3.8",
"@tarojs/plugin-platform-alipay": "^3.3.8"
"@tarojs/shared": "^3.5",
"@tarojs/plugin-platform-alipay": "^3.5"
},
"devDependencies": {
"@tarojs/service": "^3.3.0",
"@tarojs/service": "^3.5",
"@tarojs/shared": "^3.5",
"@tarojs/plugin-platform-alipay": "^3.5",
"rollup": "^2.29.0",
"rollup-plugin-typescript2": "^0.27.3",
"typescript": "^4.0.3"
Expand Down
9 changes: 9 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,15 @@ export default (ctx: IPluginContext) => {
prebundleOptions.include.push('@tarojs/shared')
}
})

ctx.modifyWebpackChain(({ chain }) => {
// fix https://github.com/NervJS/taro/issues/13478
chain.merge({
optimization: {
providedExports: false
}
})
})
}

// 支付宝小程序中,如果某个页面依赖了原生小程序组件,
Expand Down
Loading

0 comments on commit 06f0150

Please sign in to comment.