webpack / webpack

A bundler for javascript and friends. Packs many modules into a few bundled assets. Code Splitting allows for loading parts of the application on demand. Through "loaders", modules can be CommonJs, AMD, ES6 modules, CSS, Images, JSON, Coffeescript, LESS, ... and your custom stuff.
https://webpack.js.org
MIT License
64.26k stars 8.73k forks source link

test: add test for multiple inlined modules #18355

Closed fi3ework closed 3 weeks ago

fi3ework commented 1 month ago

What kind of change does this PR introduce?

Currently, there's no test case covering the following condition, if we comment this condition, no test will fail. https://github.com/webpack/webpack/blob/c586c7b1e027e1d252d68b4372f08a9bce40d96c/lib/javascript/JavascriptModulesPlugin.js#L849-L850

Did you add tests for your changes?

Adding a multiple inline modules case to cover the condition. Multiple entry file have declared same identifiers, so does non-inline modules to make sure it won't break in a more complex scenario.

Does this PR introduce a breaking change?

No.

What needs to be documented once your changes are merged?

No.

webpack-bot commented 1 month ago

For maintainers only: