-
-
Notifications
You must be signed in to change notification settings - Fork 93
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
Consistent way to handle compiled resources #365
Comments
At decidim we pass through a major redesign process, in which we have ended up replacing the WYSIWYG from QuillJS to Tip-tap, change that led to have some specs. While working with the dev-server we could not see any issue. We did not see any issues either when running in CI the specs, as there was no NODE_ENV variable being set. We only had "RAILS_ENV". One of my colleagues tried to run the editor specs locally, case when observed that the specs were failing.
During my investigation, i could observe that 'rake webpacker:compile' and the asset compiling during the test are behaving differently. The Invalid regular expression error, is being caused by tom-select dependency @orchidjs/unicode-variants, and it seems that the compiler is actually replacing
to
I could observe in my specs that i had a node_env variable that was being set, but removing it, would have no effect. I ended up, overriding the webpackConfig variable in my config.js to always use the TerserPlugin on all the environments, as being defined in https://github.com/shakacode/shakapacker/blob/master/package/environments/production.js , which in the end fixed the above issue. |
@alecslupu if you want a custom NODE_ENV, then why not just set it before running the scripts that invoke this command? |
Closed as #366 is also closed. |
Notice: A bug is a crash or incorrect behavior. If you have a debugging or troubleshooting question, please open a discussion on the Discussions Tab. Otherwise, remove this line and fill out the following sections.
Expected behavior:
Asset compilation should respect the RAILS environment in which the assets are being compiled.
Actual behavior:
Currently the behavior varies on multiple factors.
Running the command :
will compile the js assets generating the following structure:
Running
will compile the js assets generating the following structure:
Running the following command
will generate a lot of files that follow the previous response.
Running the following command
will generate the files having the following structure:
our
shackapacker.yml
( generated)Small, reproducible repo:
https://github.com/decidim/decidim ( branch chore/upgrade-shakapacker )
Setup environment:
The text was updated successfully, but these errors were encountered: