Project

General

Profile

Actions

Bug #22114

closed

foreman webpack vendor asset file can change if plugins are installed

Added by Ohad Levy almost 7 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
High
Assignee:
Category:
Packaging
Target version:
Fixed in Releases:
Found in Releases:

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.


Related issues 1 (0 open1 closed)

Related to Foreman - Refactor #24590: reduce js library duplication by pluginsClosedOhad LevyActions
Actions

Also available in: Atom PDF