Skip to content
This repository has been archived by the owner on Jul 6, 2021. It is now read-only.

[next-css] broken escaped characters #526

Closed
acelaya opened this issue Aug 26, 2019 · 3 comments
Closed

[next-css] broken escaped characters #526

acelaya opened this issue Aug 26, 2019 · 3 comments

Comments

@acelaya
Copy link

acelaya commented Aug 26, 2019

I'm using next-css to load external stylesheets on a next.js site and some special characters are getting broken after being processed by the plugin.

For example, I have a selector like this .\31 2u\28medium\29 which is getting compiled to .\31 2u28medium29.

These selectors are using special characters, like (->\28 or )->\29. It's not probably the best decission, but this is coming from a third party library.

The weird thing is that not all the escaped characters are broken. The \31 one is properly kept.

I guess the issue is more related with webpack's mini-css-extract-plugin, but I didn't find a workaround so far.

@acelaya
Copy link
Author

acelaya commented Aug 26, 2019

The issue seems to be on webpack's css-loader webpack-contrib/css-loader#578

@acelaya
Copy link
Author

acelaya commented Aug 26, 2019

Apparently, by installing css-loader ^2.0, the issue is resolved.

However, it produces a new error (ValidationError: CSS Loader Invalid Options) because next-css passes the minimize option to css-loader, which has been removed in this version.

Are there any plans to release a new version of next-css which makes use of the newer version?

@timneutkens
Copy link
Member

Hi, thanks for creating an issue. We currently recommend using https://nextjs.org/docs/basic-features/built-in-css-support as the plugins have been deprecated in favor of the built-in support.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants