Understanding webpack Configuration
It’s a little tricky to talk about webpack in the context of our project because webpack’s behavior depends on its configuration file, and one of the things Rails Webpacker does is generate that configuration file from different inputs so we don’t actually see the real webpack configuration in a file.
However, there’s a partial workaround that will allow us to print out the configuration file, or at least most of it, and we’re going to use it to guide our way through the way webpack works. We’re then going to talk about how Webpacker simplifies webpack.
The workaround to let us actually see our webpack configuration is to go to the file config/webpack/development.js and add the following lines at the end ...
Get Modern Front-End Development for Rails now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.