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 #1

Updated by Avi Sharvit almost 7 years ago

  • Assignee set to Avi Sharvit
Actions #2

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
Actions #3

Updated by Walden Raines almost 7 years ago

  • Target version set to 237
Actions #4

Updated by Walden Raines almost 7 years ago

  • Target version changed from 237 to 239
Actions #5

Updated by Avi Sharvit almost 7 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100
Actions #6

Updated by The Foreman Bot almost 7 years ago

  • Pull request https://github.com/theforeman/foreman/pull/5181 added
Actions #7

Updated by Ohad Levy over 6 years ago

  • Related to Refactor #24590: reduce js library duplication by plugins added
Actions

Also available in: Atom PDF