Giter VIP home page Giter VIP logo

Comments (5)

TxHawks avatar TxHawks commented on May 27, 2024 1

Created a pull request in next that fixes it.

Let's see what they say

from style9.

TxHawks avatar TxHawks commented on May 27, 2024

The issue seems to have been introduced in v10.2.1 and is true with both webpack 4 and 5

from style9.

johanholmerin avatar johanholmerin commented on May 27, 2024

Can confirm that this broke with next.js#24573. Probably possible to solve, but painful. Would be happy to accept a PR that fixes it. In the meantime I added a note about it in the documentation.

from style9.

TxHawks avatar TxHawks commented on May 27, 2024

I don't have much experience with webpack configurations, but this seems like an issue that could definitely block adoption for us (and probably others), so I would like to take a stab at it.

Any pointers as to where in the code should I start looking?

from style9.

johanholmerin avatar johanholmerin commented on May 27, 2024

The plugin uses the Webpack loader and plugin bundled with Next.js. getClientStyleLoader returns the path to the loader and some options, which are stringified and are used to prefix the .css import path as instructions for Webpack. It has different loaders for development and production, but we only use the production one. In addition to the loader, the MiniCssExtractPlugin from Next.js is also added. Next.js bundles it's plugins, and the error is that hotModuleReplacement.js is not included. It's possible that adding the file back is not enough, that some other changes will cause an issue, but it's a good place to start. An alternative would be to stop using the bundled css handling and include the MiniCssExtractPlugin directly, although that might cause other issues. The plugin should at least be compatible with Next.js 9.x and 10.x.

You could ask in the Next.js repo and see if anyone there could offer any assistance.

from style9.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.