Skip to content

Commit

Permalink
fix(cli-plugin-babel): properly exports the babel preset (vuejs#4533)
Browse files Browse the repository at this point in the history
  • Loading branch information
arcanis authored and haoqunjiang committed Sep 2, 2019
1 parent fbd592e commit be0cb95
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/@vue/cli-plugin-babel/generator.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module.exports = api => {

api.extendPackage({
babel: {
presets: ['@vue/app']
presets: ['@vue/cli-plugin-babel/preset']
},
dependencies: {
'core-js': '^3.1.2'
Expand Down
1 change: 1 addition & 0 deletions packages/@vue/cli-plugin-babel/preset.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = require('@vue/babel-preset-app')
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ test('use with Babel', async () => {
}
])

expect(files['babel.config.js']).toMatch(`presets: [\n '@vue/app'\n ]`)
expect(files['babel.config.js']).toMatch(`presets: [\n '@vue/cli-plugin-babel/preset'\n ]`)
expect(files['tsconfig.json']).toMatch(`"target": "esnext"`)
})

Expand Down

0 comments on commit be0cb95

Please sign in to comment.