We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 4ccb830 + 982cdbf commit c2b4321Copy full SHA for c2b4321
packages/build-next-bricks/src/build.js
@@ -199,6 +199,9 @@ async function getWebpackConfig(config) {
199
packageJson.dependencies?.[dep];
200
const singleton = sharedSingletonPackages.includes(dep);
201
202
+ const versionParts = depPackageJson.version.split(".");
203
+ const majorVersion = versionParts[0];
204
+
205
return [
206
dep,
207
{
@@ -211,7 +214,9 @@ async function getWebpackConfig(config) {
211
214
? getRequiredVersion("react")
212
215
: singleton
213
216
? "*"
- : undefined),
217
+ : majorVersion === "0"
218
+ ? `^0.${versionParts[1]}.0`
219
+ : `^${majorVersion}.0.0`),
220
...customized,
221
},
222
];
0 commit comments