Next 15 upgrade problem
Unanswered
Siamese Crocodile posted this in #help-forum
Siamese CrocodileOP
I have recently upgraded my project to nextjs@15 when I used turbopack. It's throwing error in my scss file for the export variable. What could be the reason? Is it that it still doesn't support scss
6 Replies
Short mackerel
It supports scss, always has. We’d need the exact error to help out
@Short mackerel It supports scss, always has. We’d need the exact error to help out
Siamese CrocodileOP
https://www.reddit.com/r/nextjs/comments/1hbqhgi/scss_variables_export_error/?rdt=61204
You can check this. I am facing this. I mean while using turbopack I am getting an error for the export variable in my scss file. It's working fine while not using the turbopack.
You can check this. I am facing this. I mean while using turbopack I am getting an error for the export variable in my scss file. It's working fine while not using the turbopack.
Short mackerel
To circumvent that you can just use css variables in root or just completely change to a css-in-js solution, because it is kinda mixing the layers which you don’t have to.
@Short mackerel To circumvent that you can just use css variables in root or just completely change to a css-in-js solution, because it is kinda mixing the layers which you don’t have to.
Siamese CrocodileOP
Not that. I am asking. I mean it doesn't work properly with scss right? I want to keep using scss. So better just remove the turbopack.
Short mackerel
It works with scss. It does not work with the export.
You can define variables for example:
And that way you can use it in your scss files.
You can define variables for example:
:root {
--random-bg: red;
}
And that way you can use it in your scss files.
Siamese CrocodileOP
Alright, got it. so it's a breaking change for me. 😔anyways thanks a lot