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

@zeit/next-css: Remove minimize option #286

Closed
ocean90 opened this issue Sep 25, 2018 · 7 comments
Closed

@zeit/next-css: Remove minimize option #286

ocean90 opened this issue Sep 25, 2018 · 7 comments

Comments

@ocean90
Copy link
Contributor

ocean90 commented Sep 25, 2018

The minimize option has been removed in css-loader 1.0.0 which is now used ( 91bf70a).

To avoid confusion (there is currently no minification) we should remove the line in https://github.com/zeit/next-plugins/blob/2db666d9adf96bb16532caf5048b7b44e115222d/packages/next-css/css-loader-config.js#L76

@timneutkens
Copy link
Member

Feel free to send a pull-request.

@lydell
Copy link

lydell commented Oct 11, 2018

I found it very convenient that next-css automatically minified the CSS. Can we get that back?

@jmakGH
Copy link

jmakGH commented Oct 20, 2018

Looking for some clarification, does a postcss.config.js need to be present for postcss-loader to be included? Or can we just config it in next.config's postcssLoaderOptions?

The readme says You can also pass a list of options to the postcss-loader by passing an object called postcssLoaderOptions.

But lines 49-68 in css-loader-config.js only handles the case when postcss.config.js file is present.

@timneutkens
Copy link
Member

#327 solves the automatically minimizing

@Nightliss
Copy link

Nightliss commented Jun 5, 2020

Hey guys,

the minimize option is still on the npm version of this plugin which causes build error on pnpm
image

image

The file on the repo is different
image

Invalid options seems to be ignored by npm and yarn because project builds fine. Any input on this would be appreciated.

From my packeage.json
image

@timneutkens
Copy link
Member

Next.js has built-in support for css and sass: https://nextjs.org/docs/basic-features/built-in-css-support we recommend using the built-in support which solves numerous edge cases and adds additional optimizations

@kartikag01
Copy link

Next.js has built-in support for css and sass: https://nextjs.org/docs/basic-features/built-in-css-support we recommend using the built-in support which solves numerous edge cases and adds additional optimizations

when i removed @zeit/next-css from next.config.js and package.json, thereby moving to the built-in CSS support upon upgrading to 9.2.0

I started getting this loader error.

1:0\nModule parse failed: Unexpected character '@' (1:0)\nYou may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders\n> @font-face{font-family:"sofia-pro";src:url("https://use.typekit.net/af/5855b2/00000000000000003b9b1a98/27/l?subset_id=2&fvd=n4&v=3") format("woff2"),url("https://use.typekit.net/af/5855b2/00000000000000003b9b1a98/27/d?subset_id=2&fvd=n4&v=3") format("woff"),url("https://use.typekit.net/af/5855b2/00000000000000003b9b1a98/27/a?subset_id=2&fvd=n4&v=3") format("opentype");font-style:normal;font-weight:400;font-display:swap}@font-face{font-family:'FontAwesome';src:url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/fonts//fontawesome-webfont.eot?v=4.7.0\');src:url(\'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/fonts//fontawesome-webfont.eot?#iefix&v=4.7.0\') format('embedded-opentype'),url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/fonts//fontawesome-webfont.woff2?v=4.7.0\') format('woff2'),url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/fonts//fontawesome-webfont.woff?v=4.7.0\') format('woff'),url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/fonts//fontawesome-webfont.ttf?v=4.7.0\') format('truetype'),url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/fonts//fontawesome-webfont.svg?v=4.7.0#fontawesomeregular\') ...

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

6 participants