Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to webpacker 6 #3709

Open
ferblape opened this issue Feb 15, 2021 · 1 comment
Open

Upgrade to webpacker 6 #3709

ferblape opened this issue Feb 15, 2021 · 1 comment
Labels
frontend javascript Pull requests that update Javascript code

Comments

@ferblape
Copy link
Member

ferblape commented Feb 15, 2021

We are having lots of issues with the Terser webpack plugin in CircleCI, which is causing we got a lot of failures that we tend to ignore which produce that we push to master failing tests.

Webpacker 6 is almost ready, with webpack 5 which has a default terser and doesn't require the plugin anymore

Upgrading notes: https://github.com/rails/webpacker/blob/master/docs/v6_upgrade.md

Also, remove the terser plugin and let's see if your trouble with CircleCI gets fixed

@ferblape ferblape added frontend javascript Pull requests that update Javascript code labels Feb 15, 2021
@Crashillo
Copy link
Contributor

Crashillo commented Apr 29, 2021

In order to include PurgeCSS some tips we ought to keep in mind:

  • Previous PurgeCSS versions were purging all dynamic styles. That is, if your code has a dynamic import: import("../path/to/lib") and such lib file has any style on it, purgecss will rip that out, because is not present at compilation time.
  • Libraries creating dynamic HTML, like d3 or leaflet, will be purged also. That's due to, at compilation time, there's no yet the markup which the styles refer to, hence it's removed.

Currently there's a safelist (both config or comments in code) to avoid this removal.

There's a chance this issues will be fixed in webpack v5 (webpacker v6)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
frontend javascript Pull requests that update Javascript code
Projects
None yet
Development

No branches or pull requests

2 participants