-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Codesandbox doesn't work with Bootstrap SCSS imports #4865
Comments
Hi @gragland and thanks for reporting a detailed issue! We have looked at it and identified the issue, though we have a long list of prioritized issues, so just need "to get there". Sorry for the wait, but it will be fixed eventually! |
Just wanted to check in and see if this is on the priority list. This has been causing issues for Divjoy customers who use our "Export to CodeSandbox" feature. If it looks like this is pretty far out on the roadmap (which I totally understand) then I'll need to disable the feature for now. |
Hey I tried to take a look at this today and still do not understand why this happens, the reload logic is the same as the build logic for the first time :/ Will keep digging tommorrow |
Seems I have similar issue when using Sass partials. I have posted a question here on stackoverflow but it seems to be a bug. When I use |
This issue has automatically been marked stale because there has been no activity in a while. Please leave a comment if the issue has not been resolved, or if it is not stale for any other reason. After 2 weeks, this issue will automatically be closed, unless a comment is made or the stale label is removed. |
This appears to still be an issue (commenting so not auto closed) |
This problem appears to be back.
Seems like hot loading isn't properly handling nested sass imports so variables are undefined. |
Can we please reopen this issue? |
Just encountered this now. The following error shows up every time a hot reload occurs:
Manually reloading the preview makes it work…once…but it will fail again after the next hot reload. Simple repro: |
🐛 bug report
Preflight Checklist
Description of the problem
CodeSandbox displays the following error when trying to hot load changes to a .scss file that imports Bootstrap:
Cannot find module 'bootstrap/scss/mixins' from '/src'
. The initial transpilation works fine, so it seems to just be an issue with how hot loading handles imports.I believe the issue is that Bootstrap has both a file named
_mixins.scss
and a directory namedmixins
. The initial transpilation properly imports_mixins.scss
with the syntax@import "mixins";
. My best guess is that subsequent hot loading either attempts to import themixins
directory instead or it's having issues with the underscore prefix in_mixins.scss
and it's not finding it.This affects Bootstrap and presumably other CSS frameworks that have this file/folder structure.
To Reproduce
Cannot find module 'bootstrap/scss/mixins' from '/src'
Further Thoughts
I noticed there was previously a fix (#529) for SASS resolving underscores incorrectly. Maybe this fix isn't present in the hot loading logic?
Link to sandbox: link
Your Environment
The text was updated successfully, but these errors were encountered: