Skip to content

Commit

Permalink
Remove Babel as default
Browse files Browse the repository at this point in the history
  • Loading branch information
malomalo committed Apr 1, 2024
1 parent dd3534b commit 7849739
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions lib/condenser/railtie.rb
Expand Up @@ -68,7 +68,7 @@ def pipeline(&block)

config.assets.compile = true
config.assets.digest = true
config.assets.cache_limit = 100.megabytes
config.assets.cache_limit = 1_000.megabytes
config.assets.compressors = [:zlib]

config.assets.configure do |app, env|
Expand Down Expand Up @@ -126,13 +126,7 @@ def build_environment(app, initialized = nil)
config.assets._pipeline.call(env)
else
env.register_transformer 'text/scss', 'text/css', Condenser::ScssTransformer.new

if ::Rails.env == 'development'
env.register_preprocessor 'application/javascript', Condenser::JSAnalyzer
else
env.register_preprocessor 'application/javascript', Condenser::BabelProcessor
end

env.register_preprocessor 'application/javascript', Condenser::JSAnalyzer
env.register_exporter 'application/javascript', Condenser::RollupProcessor

if ::Rails.env != 'development'
Expand Down

0 comments on commit 7849739

Please sign in to comment.