Skip to content
This repository has been archived by the owner on Jun 20, 2023. It is now read-only.

allow module aliasing #96

Closed
pillowsoft opened this issue Jan 25, 2017 · 2 comments
Closed

allow module aliasing #96

pillowsoft opened this issue Jan 25, 2017 · 2 comments

Comments

@pillowsoft
Copy link

In Webpack I can have module aliases, like:

alias: { 'react-native': 'react-native-web' }

to route all require/import of 'react-native' to 'react-native-web'. Is there any way to do this in fuse-box?

@nchanged
Copy link
Contributor

You can use shimming which will work nicely for that case

shim : {
   "react-native-web" : { exports : "require('react-native')"}
}

You can reference any object window.ReactNative, and require function is at your convenience

@pillowsoft
Copy link
Author

That works! Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants