Skip to content

Commit

Permalink
feat: generate projects with transpileDependencies: true by default (
Browse files Browse the repository at this point in the history
  • Loading branch information
haoqunjiang authored Sep 3, 2021
1 parent 3ed0a14 commit 662153b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ beforeAll(async () => {
$packageJson.browserslist.push('safari 11') // to ensure optional chaining transformation is enabled
$packageJson.dependencies['external-dep'] = '1.0.0'
$packageJson.dependencies['@scope/external-dep'] = '1.0.0'
delete $packageJson.vue
$packageJson = JSON.stringify($packageJson)

await project.write(
Expand Down
3 changes: 3 additions & 0 deletions packages/@vue/cli-plugin-babel/generator.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ module.exports = api => {
babel: {
presets: ['@vue/cli-plugin-babel/preset']
},
vue: {
transpileDependencies: true
},
dependencies: {
'core-js': '^3.8.3'
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,9 +159,7 @@ test('lint on commit', async () => {
expect(pkg['lint-staged']).toEqual({
'*.{js,jsx,vue}': 'vue-cli-service lint'
})
expect(pkg.vue).toEqual({
lintOnSave: false
})
expect(pkg.vue.lintOnSave).toBe(false)
})

test('should lint ts files when typescript plugin co-exists', async () => {
Expand Down

0 comments on commit 662153b

Please sign in to comment.