Skip to content

Commit

Permalink
Register JsAssetUrls compiler in railtie
Browse files Browse the repository at this point in the history
  • Loading branch information
keiththomps committed Sep 30, 2024
1 parent da19a42 commit 699be47
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/propshaft/assembly.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
require "propshaft/processor"
require "propshaft/compilers"
require "propshaft/compiler/css_asset_urls"
require "propshaft/compiler/js_asset_urls"
require "propshaft/compiler/source_mapping_urls"

class Propshaft::Assembly
Expand Down
3 changes: 2 additions & 1 deletion lib/propshaft/railtie.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ class Railtie < ::Rails::Railtie
config.assets.compilers = [
[ "text/css", Propshaft::Compiler::CssAssetUrls ],
[ "text/css", Propshaft::Compiler::SourceMappingUrls ],
[ "text/javascript", Propshaft::Compiler::SourceMappingUrls ]
[ "text/javascript", Propshaft::Compiler::JsAssetUrls ],
[ "text/javascript", Propshaft::Compiler::SourceMappingUrls ],
]
config.assets.sweep_cache = Rails.env.development?
config.assets.server = Rails.env.development? || Rails.env.test?
Expand Down

0 comments on commit 699be47

Please sign in to comment.