Skip to content

Instantly share code, notes, and snippets.

@theKashey
Created March 4, 2019 23:41
Show Gist options
  • Select an option

  • Save theKashey/25d63a39b4620d9127346f0002eff572 to your computer and use it in GitHub Desktop.

Select an option

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.
{
"internal": "true",
"main": "require-server.js",
"browser": "require-browser.js"
}
export const requireLazy = (module) => ({})
export const requireLazy = (module) => require(module);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment