January 21, 2021

Webpacker 6

This has been the bane of my existence lately. They've dropped support for Postcss and removed the installers that everyone has depended on for a long time. This is happening because ESM and other things are starting to shift how Rails approaches Javascript and CSS assets. In general, this is a good direction but it makes it hard to maintain projects.

Webpack Dev Server
Fixes have landed in master for the config and HMR issues that were present in Webpacker 6.

TailwindCSS Improvements
I've also refactored the stylesheets into 3 so that Webpacker can recompile smaller portions of Tailwind. This has sped up the compilation time in development from 15s to 1s.

Sourcemaps
I'm also debating on disabling the default sourcemaps. Right now, Webpacker 6 silently fails when sourcemaps fail to generate because of too few resources. This is causing issues on Hatchbox.

We can switch to a cheaper sourcemap generation instead of turning it off completely: devtool: 'eval-cheap-module-source-map'

Comments

Sign up or login to comment
Mark
© 2021 12in12