Building assets with Webpack
Here are the steps for building a process with Webpack:
- Please empty the
/themes/classic/assets/css/
and/themes/classic/assets/js/
folders to make sure that the output files will be generated by us. - From the
/themes/classic/_dev/
folder, please execute thenpm run
build
command. - If you go to the
/themes/classic/assets/
folder, you will find the compiled CSS and images/fonts in the/themes/classic/assets/css/
folder and the compiled JavaScript in the/themes/classic/assets/js/
folder. That works and saves us a lot of compiling commands! - In the same way, if we execute the
npm run watch
command, it does the same thing, but we see that it repeats the process when an entry file is saved. That will enable us to code and preview without having to retype the compiling command all the time. It’s a nice tool during long coding tasks.
Feel free to test it again with our Customer Callback Request module available at this URL: https...