Skip to content

Commit be5106a

Browse files
committed
Fix babel plugin for vue by hardcoding to 3.6.0
1 parent 2e52947 commit be5106a

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

packages/app/config/babel.dev.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ module.exports = {
1111
require.resolve('@babel/preset-env'),
1212
{
1313
targets: {
14-
ie: 11,
14+
chrome: 70,
1515
// We currently minify with uglify
1616
// Remove after https://github.com/mishoo/UglifyJS2/issues/448
1717
},

packages/app/src/sandbox/compile.ts

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

248+
if (usedDep === '@vue/babel-preset-app' && d[dep] === '^3.4.0') {
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+
248255
returnedDependencies[usedDep] = d[dep];
249256
});
250257

0 commit comments

Comments
 (0)