Skip to content

Commit c161b5c

Browse files
authored
fix: remove resolve.modules from default builder config (#7803)
1 parent 18f5798 commit c161b5c

File tree

4 files changed

+28
-5
lines changed

4 files changed

+28
-5
lines changed

packages/solutions/app-tools/src/builder/shared/builderPlugins/adapterBasic.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,6 @@ export const builderPluginAdapterBasic = (
3131
const { appContext } = options;
3232
const { metaName } = appContext;
3333

34-
// This helps symlinked packages to resolve packages correctly, such as `react/jsx-runtime`, typically for monorepo.
35-
chain.resolve.modules
36-
.add('node_modules')
37-
.add(path.join(api.context.rootPath, 'node_modules'));
38-
3934
chain.watchOptions({
4035
ignored: [
4136
`[\\\\/](?:node_modules(?![\\\\/]\\.${metaName})|.git)[\\\\/]`,

packages/toolkit/utils/package.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,5 +290,17 @@
290290
"jest": "^29.7.0",
291291
"typescript": "^5"
292292
},
293+
"peerDependencies": {
294+
"react": "^19.2.0",
295+
"react-dom": "^19.2.0"
296+
},
297+
"peerDependenciesMeta": {
298+
"react": {
299+
"optional": true
300+
},
301+
"react-dom": {
302+
"optional": true
303+
}
304+
},
293305
"sideEffects": false
294306
}

pnpm-lock.yaml

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/integration/source-code-build/components/package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,9 @@
2727
},
2828
"dependencies": {
2929
"@source-code-build/utils": "workspace:*"
30+
},
31+
"peerDependencies": {
32+
"react": "^19.2.0",
33+
"react-dom": "19.2.0"
3034
}
3135
}

0 commit comments

Comments
 (0)