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

Upgrade next-css: dependency update & added flag #581

Closed
wants to merge 1 commit into from

Conversation

davidgolden
Copy link

@davidgolden davidgolden commented Dec 17, 2019

Upgrade extract-css-chunks-webpack-plugin to latest version, which includes support for ignoreOrder flag. According to mini-css-extract-plugin docs (which extract-css-chunks-webpack-plugin emulates):

for projects where css ordering has been mitigated through consistent use of scoping or naming conventions, the css order warnings can be disabled by setting the ignoreOrder flag to true for the plugin.

Thus, it is safe to use the ignoreOrder flag where cssModules == true.

Addresses Issue #569
EDIT formatting

…ncludes support for ignoreOrder flag. According to mini-css-extract-plugin docs (which extract-css-chunks-webpack-plugin emulates), "for projects where css ordering has been mitigated through consistent use of scoping or naming conventions, the css order warnings can be disabled by setting the ignoreOrder flag to true for the plugin." Thus, it is safe to use the ignoreOrder flag where cssModules == true.
@davidgolden davidgolden changed the title Upgrade extract-css-chunks-webpack-plugin to latest version, include ignoreOrder flag with CSS modules Upgrade next-css: dependency update & added flag Dec 17, 2019
@timneutkens
Copy link
Member

We're not planning to update next-css as vercel/next.js#8626 is close to landing on stable.

@davidgolden
Copy link
Author

@timneutkens I wasn't aware of that proposal- that's good to know, thanks. However, I don't see why this non-breaking PR couldn't be a stop-gap measure so that users are able to address current warnings while vercel/next.js#8626 is still being developed.

@drewlustro
Copy link

+1 - this is a nonbreaking PR.

It will take organizations significant time to adopt vercel/next.js#8626, whereas this update could be had quickly.

Please merge and release... it's canary anyway.

@mikevercoelen
Copy link

+1 agreed, it's annoying.

Also agree on merging this now, faster to fix.

@timneutkens
Copy link
Member

You can't guarantee it won't break hence why I'm not keen on releasing it to around 50% of Next.js users vs a solution that will be guaranteed to not break + not have the css ordering issue, which is vercel/next.js#8626. There still are CSS ordering issues with cssModules in this package.

@davidgolden
Copy link
Author

@timneutkens Unless I'm misunderstanding the documentation and there's someway to use 9.2 built-in-css support with css modules and a css preprocessor, this is still relevant. Correct me if I'm wrong?

@timneutkens
Copy link
Member

Built-in css support has both css modules and postcss support:

https://nextjs.org/docs/basic-features/built-in-css-support#adding-component-level-css

For postcss you can add postcssrc.json or postcss.config.js.

SCSS/SASS support will be added very soon. Less/stylus won't be included as usage is very low.

@remidebette
Copy link

remidebette commented Mar 8, 2020

@timneutkens currently using semantic-ui-react with less is a pain in the last version of next. next-less has a dependancy on next-css and things like fonts imports do not work anymore.
see: webpack-contrib/url-loader#201
If less will not built-in in next, fine, but at least please allow the plugins to be updated.

@timneutkens
Copy link
Member

Hey! We're deprecating this repository hence why this PR hasn't been merged. I just updated the readme. Thanks for your contribution!

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

Successfully merging this pull request may close these issues.

5 participants