Skip to content

Allow imports from node modules with default install #11

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

Merged
merged 1 commit into from Sep 10, 2021
Merged

Allow imports from node modules with default install #11

merged 1 commit into from Sep 10, 2021

Conversation

ghost
Copy link

@ghost ghost commented Sep 9, 2021

I ran into an issue when trialing the new gem, whereby @import statements wouldn't load common Sass libraries without specifying the full path to the node_modules directory.

This allows simple imports such as @import 'glidecss/base'; to work with the default install.

@AndreyAzimov
Copy link
Contributor

Yeah, I managed to fix it only using absolute path like: @import '../../../node_modules/bootstrap/scss/bootstrap'

@ghost
Copy link
Author

ghost commented Sep 9, 2021

Exactly what I was doing before the change. The trouble is, if a library has dependencies, they won't get resolved. For example, https://github.com/thelucid/glidecss has a dependency on modern-normalize, so that also exists in the node_modules directory and needs to be in the load path.

@dhh dhh merged commit 43f89cd into rails:main Sep 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants