File tree 3 files changed +13
-0
lines changed
packages/@vue/babel-preset-app
3 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,8 @@ module.exports = (context, options = {}) => {
27
27
// cli-plugin-jest sets this to true because Jest runs without bundling
28
28
if ( process . env . VUE_CLI_BABEL_TRANSPILE_MODULES ) {
29
29
envOptions . modules = 'commonjs'
30
+ // necessary for dynamic import to work in tests
31
+ plugins . push ( require ( 'babel-plugin-dynamic-import-node' ) )
30
32
}
31
33
32
34
// pass options along to babel-preset-env
Original file line number Diff line number Diff line change 27
27
"@babel/preset-stage-2" : " ^7.0.0-0" ,
28
28
"@babel/runtime" : " ^7.0.0-0" ,
29
29
"babel-helper-vue-jsx-merge-props" : " ^2.0.3" ,
30
+ "babel-plugin-dynamic-import-node" : " ^1.2.0" ,
30
31
"babel-plugin-jsx-event-modifiers" : " ^2.0.5" ,
31
32
"babel-plugin-jsx-v-model" : " ^2.0.3" ,
32
33
"babel-plugin-transform-vue-jsx" : " ^3.5.1"
Original file line number Diff line number Diff line change @@ -1189,6 +1189,12 @@ babel-messages@^6.23.0:
1189
1189
dependencies :
1190
1190
babel-runtime "^6.22.0"
1191
1191
1192
+ babel-plugin-dynamic-import-node@^1.2.0 :
1193
+ version "1.2.0"
1194
+ resolved "https://registry.yarnpkg.com/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-1.2.0.tgz#f91631e703e0595e47d4beafbb088576c87fbeee"
1195
+ dependencies :
1196
+ babel-plugin-syntax-dynamic-import "^6.18.0"
1197
+
1192
1198
babel-plugin-istanbul@^4.1.4, babel-plugin-istanbul@^4.1.5 :
1193
1199
version "4.1.5"
1194
1200
resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-4.1.5.tgz#6760cdd977f411d3e175bb064f2bc327d99b2b6e"
@@ -1213,6 +1219,10 @@ babel-plugin-jsx-v-model@^2.0.3:
1213
1219
html-tags "^2.0.0"
1214
1220
svg-tags "^1.0.0"
1215
1221
1222
+ babel-plugin-syntax-dynamic-import@^6.18.0 :
1223
+ version "6.18.0"
1224
+ resolved "https://registry.yarnpkg.com/babel-plugin-syntax-dynamic-import/-/babel-plugin-syntax-dynamic-import-6.18.0.tgz#8d6a26229c83745a9982a441051572caa179b1da"
1225
+
1216
1226
babel-plugin-syntax-jsx@^6.18.0 :
1217
1227
version "6.18.0"
1218
1228
resolved "https://registry.yarnpkg.com/babel-plugin-syntax-jsx/-/babel-plugin-syntax-jsx-6.18.0.tgz#0af32a9a6e13ca7a3fd5069e62d7b0f58d0d8946"
You can’t perform that action at this time.
0 commit comments