Configure Sprockets to work with cssbundling-rails

This commit is contained in:
Andreas Nedbal 2023-01-03 12:30:30 +01:00 committed by Andreas Nedbal
parent e910630ef0
commit 219a4fbbbc
1 changed files with 9 additions and 0 deletions

View File

@ -10,3 +10,12 @@ Rails.application.config.assets.version = '1.0'
# application.js, application.css, and all non-JS/CSS in the app/assets
# folder are already added.
# Rails.application.config.assets.precompile += %w( admin.js admin.css )
# Enable Rails to resolve url() asset paths to digested assets
Rails.application.config.assets.resolve_assets_in_css_urls = true
# Include node assets in asset loading
# This is IMPORTANT because in either environment (especially local) external assets
# will not be found/resolved otherwise
Rails.application.config.assets.paths << Rails.root.join("node_modules/font-awesome/fonts")
Rails.application.config.assets.paths << Rails.root.join("node_modules/@fontsource/lexend/files")