Skip to content

Commit 8f148a6

Browse files
committed
Move check to devDependencies
1 parent b1cb559 commit 8f148a6

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

packages/app/src/sandbox/compile.ts

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -245,19 +245,23 @@ function getDependencies(parsedPackage, templateDefinition, configurations) {
245245
return; // is replaced
246246
}
247247

248-
if (usedDep === '@vue/babel-preset-app' && d[dep].startsWith('^3')) {
249-
// Native modules got added in 3.7.0, we need to hardcode to latest
250-
// working version of the babel plugin as a fix. https://twitter.com/notphanan/status/1122475053633941509
251-
returnedDependencies[usedDep] = '3.6.0';
252-
return;
253-
}
254-
255248
returnedDependencies[usedDep] = d[dep];
256249
});
257250

258251
Object.keys(devDependencies).forEach(dep => {
259252
const usedDep = DEPENDENCY_ALIASES[dep] || dep;
253+
260254
if (foundWhitelistedDevDependencies.indexOf(usedDep) > -1) {
255+
if (
256+
usedDep === '@vue/babel-preset-app' &&
257+
devDependencies[dep].startsWith('^3')
258+
) {
259+
// Native modules got added in 3.7.0, we need to hardcode to latest
260+
// working version of the babel plugin as a fix. https://twitter.com/notphanan/status/1122475053633941509
261+
returnedDependencies[usedDep] = '3.6.0';
262+
return;
263+
}
264+
261265
returnedDependencies[usedDep] = devDependencies[dep];
262266
}
263267
});

0 commit comments

Comments
 (0)