-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Automatic generated require.ensure() wrapper #105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
From @sirlancelot on January 29, 2015 1:15 Webpack does it automatically, you can write |
From @cowwoc on January 29, 2015 1:18 Excellent. Please add this to the documentation (ideally on https://github.com/webpack/docs/wiki/code-splitting). On a sidenote, is it possible to omit |
From @sirlancelot on January 29, 2015 3:20 You have to tell webpack where to split the bundle. |
From @cowwoc on January 29, 2015 4:42 @sirlancelot Okay. Why/when would users want to populate the dependencies array of |
I would imagine pre-populating the |
This would be covered by #3. |
From @cowwoc on January 28, 2015 23:52
Looking at the
require.ensure()
code found at https://github.com/webpack/docs/wiki/code-splitting, is there a tool that will automatically generate arequire.ensure()
wrapper on behalf of the user?Meaning, given:
the tool would scan for
require()
statements, and generate the followingoutput.js
:This way, the end-user codes in terms of simple synchronous
require()
and webpack generates the correct bundles with asynchronous loads under the hood.Copied from original issue: webpack/webpack#734
The text was updated successfully, but these errors were encountered: