Skip to content

Commit

Permalink
fix(rn): 修复不支持导入react-native声明的模块
Browse files Browse the repository at this point in the history
  • Loading branch information
linjinying authored and zhiqingchen committed Feb 24, 2021
1 parent ae2e3a1 commit e927069
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/taro-rn-supporter/src/Support.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ export class Supporter {
const handleEntryFile = this.fromRunner ? handleTaroFile : handleFile
const resolver: any = {
sourceExts: ['ts', 'tsx', 'js', 'jsx', 'scss', 'sass', 'less', 'css', 'pcss', 'json', 'styl', 'cjs'],
resolveRequest: handleEntryFile
resolveRequest: handleEntryFile,
resolverMainFields: ['react-native', 'browser', 'main']
}
// 兼容0.60
const rnVersion = getReactNativeVersion()
Expand Down

0 comments on commit e927069

Please sign in to comment.