Handle commonschunkplugin assets#64
Open
steven-haddix wants to merge 4 commits intomarkdalgleish:masterfrom
Open
Handle commonschunkplugin assets#64steven-haddix wants to merge 4 commits intomarkdalgleish:masterfrom
steven-haddix wants to merge 4 commits intomarkdalgleish:masterfrom
Conversation
… commonschunkplugin
Owner
|
Coverage has dropped below the threshold. Any chance you could add tests for this? |
Author
|
Yeah I'll try to get some in within the next day or two. |
Owner
|
I have a couple of concerns:
|
Author
|
- 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? |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.