Add support for experimentalCodeSplitting from Rollup 0.55.0#283
Add support for experimentalCodeSplitting from Rollup 0.55.0#283lukastaegert merged 3 commits intorollup:masterfrom
Conversation
…d on correct sourcemap output.
|
Please merge this PR ASAP. It is currently blocking a critical update to stencilJS, in order to make the 1.0 release with full ES module support. Thanks :) |
lukastaegert
left a comment
There was a problem hiding this comment.
Great fix, thanks a lot! I'll release it once I had a look at the remaining open PRs.
| entryModuleIds.push( resolved ); | ||
| }) | ||
| ) | ||
| ); |
There was a problem hiding this comment.
Minor totally unimportant nit: This looks a little more confusing as it needs to be (and it can possibly shuffle the order of the entry points which may or may not cause someone to stumble over this again in the future). If you Promise.all the mapped entryModules first and then assign the resulting array to entryModuleIds, the order would be preserved and one would not stop for a second to wonder if entryModuleIds really is a permuted map of entryModules 😉
There was a problem hiding this comment.
Totally fair, I have updated the code to be more succinct and to use the result of the entryModuleIdsPromise.
| if ( extensions.indexOf( extname( id ) ) === -1 ) return null; | ||
|
|
||
| return entryModuleIdsPromise.then( () => { | ||
| return entryModuleIdsPromise.then( (entryModuleIds) => { |
There was a problem hiding this comment.
That was quick. Yes, that's even better!
|
Awesome!!! |
This pull request is to close issue #282. The code update includes changes to allow for an array of file paths as well as a single string for
input/entry. I have also added tests to ensure we have coverage.As part of this PR I had to upgrade the project's rollup dependency to 0.55. It appears that in doing so a test was failing for sourcemap paths. If a
sourcemapFileis supplied then the internal sourcemap paths should be relative.