Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Broken with Next.js 12.1.4 #14

Closed
medihack opened this issue Mar 31, 2022 · 7 comments · Fixed by #15
Closed

Broken with Next.js 12.1.4 #14

medihack opened this issue Mar 31, 2022 · 7 comments · Fixed by #15
Assignees
Labels
bug Something isn't working

Comments

@medihack
Copy link

I tried to use next-global-css with a freshly created Next.js 12.1.4 app (no other additional dependencies), but after starting the dev server it stucks in "compiling...".

The simple next.config.js I tried:

/** @type {import('next').NextConfig} */
const { patchWebpackConfig } = require("next-global-css");

const nextConfig = {
  reactStrictMode: true,
  webpack: (config, options) => {
    patchWebpackConfig(config, options);

    return config;
  },
};

module.exports = nextConfig;

Any idea what could be wrong?

@vasturiano
Copy link

I believe this only happens when upgrading to React 18. And in that case it occurs regardless of the Next version.

Any plans for fixes, or any workaround to make it work with React 18?

@yarastqt
Copy link
Member

yarastqt commented Apr 6, 2022

@vasturiano Actually I think this not related with 18 react, because this library just patch webpack loaders.

@yarastqt
Copy link
Member

yarastqt commented Apr 6, 2022

@medihack I was able to reproduce this behavior, but I don't know how to fix this at current time. I'm going to research 🤔

UPD. I guess I found problem and try to fix this.

@yarastqt yarastqt added the bug Something isn't working label Apr 6, 2022
@yarastqt yarastqt self-assigned this Apr 6, 2022
@terwort
Copy link

terwort commented Apr 6, 2022

@yarastqt Will this possibly get fixed tonight or tomorrow morning?

@yarastqt
Copy link
Member

yarastqt commented Apr 6, 2022

I made PR with fixes #15 (comment) and publish canary version [email protected].

Anybody can check this version for own project?

@terwort
Copy link

terwort commented Apr 7, 2022

I tested it just now and my app compiled successfully. Thank you!

@yarastqt
Copy link
Member

yarastqt commented Apr 7, 2022

Ok, I published [email protected]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants