-
Notifications
You must be signed in to change notification settings - Fork 356
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Sass in browser not workig #2113
Comments
Could you provide a minimal repro? That would be either a github repo that we can clone and test against, or a set of I imagine that given the error you are seeing, browsers and OSs don't make a difference and get the same error, right? |
here is the example repo. https://github.com/nbsharath/example-scss |
This reproduction has 29 dependencies. Can you provide a minimal reproduction that includes as few dependencies as possible to reproduce the issue? Ideally without frameworks like React. |
Sorry. I have update the the repo |
Next.js sets a global globalThis.process = null; I suppose a quick fix would be to more defensively check for HT to @jamesnw for help debugging this! |
브라우저 내 sass 컴파일러를 적용하려고 했으나 nextjs의 구조 때문에 힘든 상황. 일단 package의 sass 버전만 브라우저 컴파일이 가능한 버전으로 업데이트 https://github.com/sass/sass/issues/3662
@jgerigmeyer Thanks 👍 Will try it. |
I think it might be worth adding an |
Finally having some time to look at this. The "robust" way to check whether a script runs on node seems to be Either way, I think being more defensive with optional chain operators is a good idea, and also setting the process variable only when |
I'm gonna transfer this issue to sass/dart-sass since that's where the problem is, I'll have a PR ready in a few minutes |
* Fix crash in browser when running alongside NextJS Fixes #2113 * update sass_api pubspec
I am trying to use sass in the browser through webpack bundle.
But its giving this error
I have webpack.
Browser:
firefox
OS:
windows
Version
^1.66.1
The text was updated successfully, but these errors were encountered: