Created
March 4, 2019 23:41
-
-
Save theKashey/25d63a39b4620d9127346f0002eff572 to your computer and use it in GitHub Desktop.
Webpack "lazy" require done right - just create `requireLazy` directory and drop these file there.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "internal": "true", | |
| "main": "require-server.js", | |
| "browser": "require-browser.js" | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export const requireLazy = (module) => ({}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export const requireLazy = (module) => require(module); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment