Posted over 3 years ago. Visible to the public.

Debugging Webpacker config

Option 1: JSON dump

In config/webpack/environment.js you can get inspect environment which includes all webpack config options set for the current environment:

Copy
const { environment } = require('@rails/webpacker') const webpack = require('webpack') throw JSON.stringify(environment, null, 2) ...

Option 2: Browser console

You can also debug the config in your browser directly with a newer version of Webpacker:

Copy
process.env.NODE_ENV = process.env.NODE_ENV || 'development' const environment = require('./environment') const webpackConfig = environment.toWebpackConfig() debugger module.exports = webpackConfig

Then run bin/webpack --debug and a browser window will be opened if you have a node debugger installed Archive .

Option 3: Node console

Copy
$ RAILS_ENV=development node const config = require('./config/webpack/development')

Flaky tests are tests that sometimes fail for no obvious reason. They are the plague of many end-to-end (E2E) test suites that automate the browser through tools like Capybara and Selenium.

Join our free training event and learn to fix any flaky test suite, even in large legacy applications.

Owner of this card:

Avatar
Natalie Zeumann
Last edit:
8 months ago
by Julian
About this deck:
We are makandra and do test-driven, agile Ruby on Rails software development.
License for source code
Posted by Natalie Zeumann to makandra dev
This website uses short-lived cookies to improve usability.
Accept or learn more