Skip to content
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

Add support for sassOptions.includePaths to configure sass compiler #4031

Closed
oviirup opened this issue Mar 1, 2023 · 6 comments
Closed

Add support for sassOptions.includePaths to configure sass compiler #4031

oviirup opened this issue Mar 1, 2023 · 6 comments

Comments

@oviirup
Copy link

oviirup commented Mar 1, 2023

Which project is this feature idea for?

Turbopack

Describe the feature you'd like to request

Turbo repo does not works if sassOptions.includePaths is present.

I guess this configuration is not used that often by others, but in my workflow, it is very much needed. Here is what my next.config.js looks like

// next.config.js
module.exports = nextObfuscator({
  experimental: { appDir: true },
  sassOptions: { includePaths: [path.join(__dirname, 'styles')] },
})

I use tailwind inside CSS modules, that's the main reason to use sassOptions.includePaths

Describe the solution you'd like

I know nothing about how turbopack works behind the scenes. but you can use previous sass compiler that can understand sassOptions.includePaths only if it is present

Describe alternatives you've considered

My alternative solution would be to add native support for tailwind, 😅

@oviirup oviirup added needs: triage New issues get this label. Remove it after triage story labels Mar 1, 2023
@GarryOne
Copy link

GarryOne commented Mar 6, 2023

@padmaia padmaia removed the needs: triage New issues get this label. Remove it after triage label Mar 22, 2023
@GarryOne
Copy link

vercel/next.js#49882

@jridgewell
Copy link
Contributor

Fixed with vercel/next.js#49882

@GarryOne
Copy link

Still getting

image

Next v13.4.5

@GarryOne
Copy link

Still getting

image Next `v13.4.5`

Fixed with:
vercel/next.js#51259

@oviirup
Copy link
Author

oviirup commented Aug 12, 2023

The main reason I am looking for sassOptions is to use absolute paths in sass files. Something like this

@import 'styles/components.sass'
...

It seems you don't need really need to customise sassOptions if you are using postcss and tailwind. You can use absolute imports without any comfiguration.

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

No branches or pull requests

5 participants