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): add Next.js config enhancer for supporting css moduels in workspace libs #4047

Merged
merged 1 commit into from
Nov 9, 2020

Conversation

jaysoo
Copy link
Member

@jaysoo jaysoo commented Nov 6, 2020

Add a withNx function for next.config.js to use. This function will modify the webpack config to allow workspace libs to use CSS modules.

Current Behavior

CSS modules don't work in workspace libs when importing them into next.js app.

Expected Behavior

CSS modules should work in workspace libs when importing them into next.js app.

Related Issue(s)

Fixes #3803

@nx-cloud
Copy link

nx-cloud bot commented Nov 6, 2020

Nx Cloud Report

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

Status Command Start Time
#000000 nx build-base next 11/9/2020, 4:21:22 PM
#000000 nx run-many --target=build --all --parallel 11/9/2020, 4:21:20 PM
#000000 nx run-many --target=e2e --projects=e2e-next 11/9/2020, 4:21:57 PM
#000000 nx run-many --target=lint --all --parallel 11/9/2020, 4:22:31 PM
#000000 nx run-many --target=test --all --parallel 11/9/2020, 4:21:31 PM

Sent with 💌 from NxCloud.

@jaysoo jaysoo force-pushed the fix/nextjs-css-modules-for-libs branch from 1335b97 to 3c7784b Compare November 9, 2020 16:16
@jaysoo jaysoo merged commit a297db6 into nrwl:master Nov 9, 2020
@jaysoo jaysoo deleted the fix/nextjs-css-modules-for-libs branch November 9, 2020 16:52
Doginal pushed a commit to Doginal/nx that referenced this pull request Nov 25, 2020
@vinverdy
Copy link

vinverdy commented Dec 9, 2020

i think i have an issue related to this, babel-plugin-macros not working on library. I am not familiar with webpack, is there any clue to solve my issue?

i try use some code from next-transpile-modules, but cant find it working.

@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 21, 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>.
3 participants