-
Notifications
You must be signed in to change notification settings - Fork 512
fix: refer to the entrypoint
instead of the first module
(module.identifier
)
#601
Conversation
Codecov Report
@@ Coverage Diff @@
## master #601 +/- ##
==========================================
+ Coverage 87.41% 87.45% +0.04%
==========================================
Files 7 7
Lines 302 303 +1
Branches 68 68
==========================================
+ Hits 264 265 +1
Misses 36 36
Partials 2 2
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can your describe more information (test repo would be best), also add tests for this, thanks!
Commit 426e758 adds a test case. |
See also webpack/webpack.js.org#1527. |
miraiken/web@46dfdde is an easy workaround. |
@akihikodaki thanks for PR |
module
(module.identifier
)
@sokra need review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR is good.
Seems like we missed updating ETP when webpack removed the entrypoint id = 0 limitation.
compilation.modules.forEach((module) => { | ||
if (module.id === id) { item[0] = module.identifier(); } | ||
if (typeof text === 'string') { | ||
text = [[compilation.entries[0].identifier(), text]]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can use [[entries[0].identifier(), text]]
too i guess.
@akihikodaki friendly ping |
|
Also fixes webpack/webpack#5733 |
52a1942 applies #601 (review). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@akihikodaki Thx
@akihikodaki - Once #652 lands, this will need one more quick rebase before it merges. |
@akihikodaki #652 just landed please rebase when time :) |
@akihikodaki Can you revert to |
…tifier The order of modules can be reordered by optimize-module-order plugins. The intention is to use the entry point as the default identifier, so refer to entries property of the compilation.
f2c3056: Reverted the change. I reviewed the intension why I used |
extract-text-webpack-plugin/src/loader.js Line 81 in f2c3056
entries argument seems to be unused
|
No, I didn't. |
module
(module.identifier
)entrypoint
instead of the first module
(module.identifier
)
entrypoint
instead of the first module
(module.identifier
)entrypoint
instead of the first module
(module.identifier
)
Thanks! Could someone post here when we get a release bump with this fix? |
Is there any plan to release a new version with this fix? The issue with |
The order of modules can be reordered by
optimize-module-order
plugins. The intention is to use the entry point as the default identifier, so refer to entries property of the compilation.