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
Handle commonschunkplugin assets #64
base: master
Are you sure you want to change the base?
Handle commonschunkplugin assets #64
Conversation
… commonschunkplugin
Coverage has dropped below the threshold. Any chance you could add tests for this? |
Yeah I'll try to get some in within the next day or two. |
I have a couple of concerns:
|
- Yeah this would definitely need to be handled in a better way. Mostly
just my first stab at a fix.
- Would this mean you'd have to webpack twice and then marry up the results
in some way?
…On Thu, Nov 24, 2016, 3:30 PM Mark Dalgleish ***@***.***> wrote:
I have a couple of concerns:
- The chunks have been hard-coded as 'vendor' and 'manifest', meaning
this can't work on arbitrary sets of chunks.
- When I think this through further, you should probably be using a
separate static render config *without* bundle splitting, rather than
trying to get chunked output to run in a node context. This is something I
should probably document, possibly even warn against.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#64 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAQtQjeHP31y5j7mjJ34zMUiLri-rmDYks5rBfPUgaJpZM4KiuYP>
.
|
is using I haven't worked out how to get it working... i would still get this error: When i remove the commonChunksPlugin everything is cool. any thoughts? |
Currently, commonschunkplugin will pull vendor libraries into a separate asset and use a manifest file to pull assets on demand. Webpack does this by updating the main app asset to use a global webpackJsonp function to pull in dependencies. WebpackJsonp will not be available in the global context during eval and the build will fail.
I've added a function the does an eval on both manifest and vendor assets, then inserts those into the scope of the main app eval. This should make any vendor related assets available to the app during build time.