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

fix(nextjs): allow node modules css import in libs #5479

Merged
merged 1 commit into from
May 4, 2021
Merged

fix(nextjs): allow node modules css import in libs #5479

merged 1 commit into from
May 4, 2021

Conversation

kirjai
Copy link
Contributor

@kirjai kirjai commented Apr 27, 2021

Next.js allows importing "global" css from node modules anywhere in the app (docs).

The change introduced is pretty much the same as what we're already doing for css and sass modules

Current Behavior

Importing css files from node modules inside a lib that is then consumed by a next.js app throws an error.

Expected Behavior

Behaviour should be the same as in next.js - no error should be thrown.

Related Issue(s)

Fixes #3803

@nx-cloud
Copy link

nx-cloud bot commented Apr 27, 2021

Nx Cloud Report

CI ran the following commands for commit 36f5e88. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this branch

Status Command
#000000 nx affected --target=build
#000000 nx affected --target=e2e
#000000 nx affected --target=lint
#000000 nx affected --target=test

Sent with 💌 from NxCloud.

@vercel
Copy link

vercel bot commented Apr 30, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/nrwl/nx-dev/Fwvw25YttHeBaGy327eRkjJtev3d
✅ Preview: https://nx-dev-git-fork-kirjai-next-global-css-nrwl.vercel.app

@ziyadshaikh013
Copy link

@kirjai This is broken again in next version 13 and above, can you please reopen it and check it out?

@github-actions
Copy link

This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 10, 2023
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.

Global CSS cannot be imported from files other than your Custom <App>.
2 participants