-
Notifications
You must be signed in to change notification settings - Fork 82
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
Uglifier error in production mode on RoR 7.0.3.1 with Bootstrap 5.2 #187
Comments
Some refer to the need to use a |
Sorry I found this issue while looking into something else about terser/rails on Google. What's the problem here exactly? Does the minified js file work when you remove |
@dave105010 In development mode, everything works fine until |
+1 Also seeing this exact same issue when upgrading Bootstrap in both Development and Production I'm seeing this when I run
The |
# gem 'uglifier', '~> 4.2'
gem 'terser', '~> 1.1', '>= 1.1.12' # config.assets.js_compressor = Uglifier.new(harmony: true)
config.assets.js_compressor = :terser |
@itsalongstory |
So, how did you get Uglifier to handle Bootstrap 5.2 correctly now? |
@itsalongstory |
Can you describe a little bit about the problems you've encountered with |
@itsalongstory |
In my project, uglifier does not work with Bootstrap 5.2, but terser works fine with Bootstrap 5.2 |
I think we should first understand why it's blowing up. It's not clear to me if the issue is in uglifier or in Bootstrap. |
I think the problem is uglifier doesn't full support ES6, and Bootstrap 5.2 has some new ES6 code. |
@itsalongstory Ah, ok - that explains it. The README does say I switched to terser and that solved my problem, so I think that's the resolution for this issue. If terser doesn't work for you I would suggest opening an issue against the terser repo. |
I faced a similar problem. And I solved the problem by switching to terser. Thanks. |
@bekkou68 me too, thanks. |
Ruby 3.1.2
Ruby on Rails 7.0.3.1
gem Uglifier 4.2.0
Third party library: Bootstrap 5.2 ( new version 5.2 released )
With bootstrap 5.1.3 (previous version) all works fine!
app/assets/config/manifest.js
:in view stylesheets and javascripts are attached via
stylesheet_link_tag
andjavascript_include_tag
config/environments/production.rb
:log/production.log
:All other compressors are works with errors in this case
The text was updated successfully, but these errors were encountered: