Open higgsboz-beam opened 1 year ago
Thanks for reporting this, I'll try and reproduce this tomorrow.
Hey just wanted to check in and see if you were able to reproduce this.
hey, sorry I got really busy. I will try to take a look soon.
hey, sorry I got really busy. I will try to take a look soon.
No worries! Appreciate the help
any progress on this one?
Well this is just a case of adjusting the resolutions option in webpack. However if you use .web.js or .web.ts it should always resolve that module first.
Thats because the config is defined like this
config.resolve.extensions = [
'.web.js',
'.web.jsx',
'.web.ts',
'.web.tsx',
...config.resolve.extensions,
];
also you can try putting ios/android last but that might not have the desired effect
config.resolve.extensions = [
'.web.js',
'.web.jsx',
'.web.ts',
'.web.tsx',
...config.resolve.extensions,
'.ios.js' // probably won't work
];
thats because .ios.js
also matches .js
so the only safe bet would be to use .web.js to make sure thats the file which gets resolved first.
Describe the bug
When running
build-storybook
to generate the react-native-web project, the process tends to error out when attempting to handle a module that uses platform specific js files.Steps to reproduce the behavior
const TypeNativeModule = SomeNativeModule
export default TypeNativeModule
Expected behavior
These files should be transpiled correctly.
Screenshots and/or logs
Here is an example output I get when running
build-storybook
Environment