Bug #22114
closedforeman webpack vendor asset file can change if plugins are installed
Description
Currently, webpack generates two JS bundles, one called bundle and the other is vendor. additional bundles are created per plugin (if the plugin uses webpack).
Webpack is currently configured using the CommonsChunkPlugin to detect if a plugin is using a library (e.g. react), in the case that it detect that both a plugin and core uses the library, it move it into the vendor bundle (to avoid the library to be loaded twice).
This can easily break packaging as the vendor bundle is supplied by the foreman package, and plugin installation can't alter the files delivered by the foreman package.
a solution could be to define the libraries that we move to the vendor file statically, and only those who are defined there can be used by plugins.
other dynamic solutions can also apply - see https://medium.com/@ottoki/adventures-with-webpack-manifest-and-commonschunkplugin-c89631fc87fb for some details.
Updated by The Foreman Bot almost 7 years ago
- Status changed from New to Ready For Testing
- Pull request https://github.com/theforeman/foreman/pull/5145 added
Updated by Walden Raines almost 7 years ago
- Target version changed from 237 to 239
Updated by Avi Sharvit almost 7 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset 3bba4cf188b755663523f86b10b20a2f4e4d7c8a.
Updated by The Foreman Bot almost 7 years ago
- Pull request https://github.com/theforeman/foreman/pull/5181 added
Updated by Ohad Levy over 6 years ago
- Related to Refactor #24590: reduce js library duplication by plugins added