-
Notifications
You must be signed in to change notification settings - Fork 360
Webpack
Trying to document the usual problems people have with our webpack, and ways of fixing them.
compile the UI code + plugins:
bin/update
- it all happens automatically during bin/update, but maybe that's not enough
rake update:ui
- runs yarn
in all the repositories, and then webpack
bin/webpack
- (in ui-classic) runs just the webpack part
bin/webpack --watch
- runs webpack and keeps watching for changes
rake webpack:clobber
- clear all webpack compiled code
rake yarn:clobber
- clear installed npm packages from all repos - usually needed after Fedora upgrade
Webpack doesn't just compile ui-classic code, it also compiles code from all rails plugins.
Specifically, rake webpack:paths
generates a manageiq-ui-classic/config/webpack/paths.json
containing paths to each gem with a package.json and app/javascript, and the output path to manageiq/public
.
Webpack then reads that paths.json
file to find all the sources and output path.
(You can use rake update:print_engines
to see the list of relevant UI engines.)