Next.js: Example using CSS Blocks

Created on 17 Jun 2018  路  9Comments  路  Source: vercel/next.js

Feature request

Is your feature request related to a problem? Please describe.

It would be great to see support for CSS Blocks

Describe the solution you'd like

CSS Blocks is a CSS framework that uses static analysis and dead code elimination to output highly performant stylesheets. Perhaps it could be a good fit for Next.js?

good first issue example

Most helpful comment

@Jaace @timneutkens
Can i do this?

All 9 comments

Has anyone been able to add cssblocks to a NEXT 7 project? I'm curious about it but not quite sure about how to start.

I guess an example can be made by the community, we won't be adding it as part of the core at this point.

Perhaps this is my naivety with this setup, but could one hypothetically set this up using:

  1. The custom Webpack config with Next.js
  2. The Webpack plugin for CSS-Blocks.
  3. CSS Blocks JSX Analyzer / Rewriter

I'm probably overlooking something here and I haven't tried this yet.

@Jaace @timneutkens
Can i do this?

@omeraplak definitely 馃憤

I have been looking into this. Currently it looks like this may be harder to implement than it looks.

A few observations:

  • The latest release of the package is 2 years old (see css-blocks on npm) however the maintainer still commits on a pretty regular basis.
  • This package seems to be barely used, with 5 downloads per week at the time of writing.
  • The official docs from css-blocks about integration using webpack is based on Webpack 3 and uses deprecated features.

After trying for a good hour, I did not get this to work. Integration may require substantial work and possible updates to the css-blocks repository.

I believe the right package is https://www.npmjs.com/package/@css-blocks/core, but it still only has 170 downloads.

Going to close this as @timer pointed out the package is not really in use and this has been open / labeled for 1,5 year without progress.

Perhaps one of the core maintainers of @css-blocks would be interested in adding an example.

@chriseppstein What is the timeline for css-blocks? any interest in this? It would certainly promote interest.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jesselee34 picture jesselee34  路  3Comments

knipferrc picture knipferrc  路  3Comments

flybayer picture flybayer  路  3Comments

YarivGilad picture YarivGilad  路  3Comments

havefive picture havefive  路  3Comments