In config/webpack/environment.js
you can get inspect environment
which includes all webpack config options set for the current environment:
const { environment } = require('@rails/webpacker')
const webpack = require('webpack')
throw JSON.stringify(environment, null, 2)
...
You can also debug the config in your browser directly with a newer version of Webpacker:
process.env.NODE_ENV = process.env.NODE_ENV || 'development'
const environment = require('./environment')
const webpackConfig = environment.toWebpackConfig()
debugger
module.exports = webpackConfig
bin/webpack --debug-webpacker
(see
here
Show archive.org snapshot
)chrome://inspect
$ RAILS_ENV=development node
const config = require('./config/webpack/development')
const process = require('process')
const { environment } = require('@rails/webpacker')
const webpack = require('webpack')
process.emitWarning('Some warning')