Skip to content
Martin Hradil edited this page Jul 30, 2019 · 3 revisions

Trying to document the usual problems people have with our webpack, and ways of fixing them.

Run it

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

Clear it

rake webpack:clobber - clear all webpack compiled code

rake yarn:clobber - clear installed npm packages from all repos - usually needed after Fedora upgrade

Plugins

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.)

Clone this wiki locally