-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
taro 3.6.x之后提供了 扩展web的编译平台插件。index.ts中的 helper.PLATFORMS.H5 的判断需要更新。
需要修改为
import { isWebPlatform } from '@tarojs/shared'
import * as path from 'path'
import { isWebPlatform } from '@tarojs/shared'
export default (ctx) => {
ctx.modifyWebpackChain(({ chain }) => {
// 由于有自定义编译平台,这里要根据 TARO_PLATFORM 来判断
if (!isWebPlatform()) {
chain.plugin('providerPlugin').tap((args) => {
return [
{
...(args[0] || {}),
HTMLAnchorElement: [path.resolve(__dirname, './constructor.js'), 'HTMLAnchorElement']
}
]
})
}
// .............
})
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels