Skip to content

feat(enhanced): fallback to unlayered if no layer specified in share #3832

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

Draft
wants to merge 13 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .changeset/dirty-owls-pretend.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@module-federation/nextjs-mf': patch
'@module-federation/enhanced': patch
'@module-federation/node': patch
---

Fallback to unlayered share if no layer match exists
3 changes: 0 additions & 3 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,6 @@ jobs:
- name: Warm Nx Cache
run: npx nx run-many --targets=build --projects=tag:type:pkg --parallel=4

- name: Run Build for All
run: npx nx run-many --targets=build --projects=tag:type:pkg --parallel=4 --skip-nx-cache

- name: Check Package Publishing Compatibility
run: |
for pkg in packages/*; do
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
- name: Build and test Packages
run: |
git fetch origin main
npx nx run-many --targets=build --projects=tag:type:pkg --skip-nx-cache
npx nx run-many --targets=build --projects=tag:type:pkg
ls -l packages/*/dist packages/*/package.json

- name: Release
Expand Down
12 changes: 6 additions & 6 deletions apps/next-app-router/next-app-router-4000/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,25 +19,25 @@
},
"dependencies": {
"@heroicons/react": "2.1.3",
"@module-federation/nextjs-mf": "workspace:*",
"clsx": "2.1.1",
"date-fns": "3.6.0",
"dinero.js": "2.0.0-alpha.10",
"ms": "3.0.0-canary.1",
"next": "15.0.0-canary.193",
"react": "19.0.0-rc-cd22717c-20241013",
"react-dom": "19.0.0-rc-cd22717c-20241013",
"next": "15.3.3",
"react": "19.1.0",
"react-dom": "19.1.0",
"server-only": "0.0.1",
"styled-components": "6.1.8",
"use-count-up": "3.0.1",
"vercel": "34.0.0",
"@module-federation/nextjs-mf": "workspace:*"
"vercel": "34.0.0"
},
"devDependencies": {
"@tailwindcss/forms": "0.5.7",
"@tailwindcss/typography": "0.5.12",
"@types/ms": "0.7.34",
"@types/node": "20.12.7",
"@types/react": "npm:types-react@19.0.0-rc.1",
"@types/react": "19.1.0",
"@types/react-dom": "npm:[email protected]",
"@vercel/git-hooks": "1.0.0",
"autoprefixer": "10.4.19",
Expand Down
12 changes: 6 additions & 6 deletions apps/next-app-router/next-app-router-4001/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,25 +19,25 @@
},
"dependencies": {
"@heroicons/react": "2.1.3",
"@module-federation/nextjs-mf": "workspace:*",
"clsx": "2.1.1",
"date-fns": "3.6.0",
"dinero.js": "2.0.0-alpha.10",
"ms": "3.0.0-canary.1",
"next": "15.0.0-canary.193",
"react": "19.0.0-rc-cd22717c-20241013",
"react-dom": "19.0.0-rc-cd22717c-20241013",
"next": "15.3.3",
"react": "19.1.0",
"react-dom": "19.1.0",
"server-only": "0.0.1",
"styled-components": "6.1.8",
"use-count-up": "3.0.1",
"vercel": "34.0.0",
"@module-federation/nextjs-mf": "workspace:*"
"vercel": "34.0.0"
},
"devDependencies": {
"@tailwindcss/forms": "0.5.7",
"@tailwindcss/typography": "0.5.12",
"@types/ms": "0.7.34",
"@types/node": "20.12.7",
"@types/react": "npm:types-react@19.0.0-rc.1",
"@types/react": "19.1.0",
"@types/react-dom": "npm:[email protected]",
"@vercel/git-hooks": "1.0.0",
"autoprefixer": "10.4.19",
Expand Down
4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"build:website": "nx run website-new:build",
"extract-i18n:website": "nx run website:extract-i18n",
"sync:pullMFTypes": "concurrently \"node ./packages/enhanced/pullts.js\"",
"app:next:dev": "nx run-many --target=serve --configuration=development -p 3000-home,3001-shop,3002-checkout",
"app:next:dev": "NX_TUI=false nx run-many --target=serve --configuration=development -p 3000-home,3001-shop,3002-checkout",
"app:next:build": "nx run-many --target=build --parallel=2 --configuration=production -p 3000-home,3001-shop,3002-checkout",
"app:next:prod": "nx run-many --target=serve --configuration=production -p 3000-home,3001-shop,3002-checkout",
"app:node:dev": "nx run-many --target=serve --parallel=10 --configuration=development -p node-host,node-local-remote,node-remote,node-dynamic-remote-new-version,node-dynamic-remote",
Expand Down Expand Up @@ -84,8 +84,6 @@
"lodash.get": "4.4.2",
"openai": "^4.72.0",
"rambda": "7.5.0",
"react": "18.3.1",
"react-dom": "18.3.1",
"react-router-dom": "6.26.2",
"regenerator-runtime": "0.14.1",
"sharp": "^0.33.4",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,8 @@ export type ConsumeOptions = {
* Issuer layer in which the module should be resolved
*/
issuerLayer?: string | null;
/**
* Enable reconstruction of node_modules path for matching internal package imports.
*/
nodeModulesReconstructedLookup?: boolean;
};
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,8 @@ export interface ConsumesConfig {
* The actual request to use for importing the module. If not specified, the property name/key will be used.
*/
request?: string;
/**
* Enable reconstruction of node_modules path for matching internal package imports.
*/
nodeModulesReconstructedLookup?: boolean;
}
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,8 @@ export interface ProvidesConfig {
* The actual request to use for importing the module. If not specified, the property name/key will be used.
*/
request?: string;
/**
* Enable reconstruction of node_modules path for matching internal package imports.
*/
nodeModulesReconstructedLookup?: boolean;
}
Loading