-
Notifications
You must be signed in to change notification settings - Fork 46
Open
Description
Description:
Rails 8.0.2
Webpack 5.99.5
dartsass-rails 0.5.1
sprockets 4.2.2
# app/assets/stylesheets/application.scss
@use "somename-core-assets/app/assets/stylesheets/gemname_core/application";
RAILS_ENV=production SECRET_KEY_BASE=1 bundle exec rails dartsass:build --trace
# config/initializers/assets.rb
Rails.application.config.assets.paths << Rails.root.join("node_modules")
Compiles without problems and path to node package is resolved.
When trying to use only path to specific node module, getting:
# config/initializers/assets.rb
Rails.application.config.assets.paths << Rails.root.join("node_modules", "somename-core-assets")
Error: Can't find stylesheet to import.
╷
3 │ @use "somename-core-assets/app/assets/stylesheets/gemname_core/application";
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
╵
app/assets/stylesheets/application.scss 3:1 root stylesheet
bin/rails aborted!
Command failed with exit 65: /Users/name/.rbenv/versions/3.4.2/bin/ruby
/Users/name/.rbenv/versions/3.4.2/lib/ruby/gems/3.4.0/gems/dartsass-rails-0.5.1/lib/tasks/build.rake:6:in 'Kernel#system'
/Users/name/.rbenv/versions/3.4.2/lib/ruby/gems/3.4.0/gems/dartsass-rails-0.5.1/lib/tasks/build.rake:6:in 'block (2 levels) in <main>'
Any way to point only to specific node module, without exposing whole node_modules ?
Metadata
Metadata
Assignees
Labels
No labels