Skip to content

Commit

Permalink
tweak ts setup
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed Jan 11, 2018
1 parent 18036a3 commit 957e08d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 21 deletions.
16 changes: 4 additions & 12 deletions packages/@vue/cli-plugin-typescript/generator/template/tslint.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,10 @@
"tslint:recommended"
],
"rules": {
"quotemark": [
true,
"single"
],
"indent": [
true
],
"interface-name": [
false
],
"arrow-parens": false,
// Pending fix for shorthand property names.
"quotemark": [true, "single"],
"indent": [true, "spaces", 2],
"interface-name": false,
"ordered-imports": false,
"object-literal-sort-keys": false
}
}
1 change: 1 addition & 0 deletions packages/@vue/cli-plugin-typescript/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ module.exports = api => {
.test(/\.tsx?$/)
.include
.add(api.resolve('src'))
.add(api.resolve('test'))
.end()
.use('ts-loader')
.loader('ts-loader')
Expand Down
14 changes: 5 additions & 9 deletions packages/@vue/cli-plugin-unit-mocha/index.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
module.exports = api => {
api.configureWebpack(webpackConfig => {
api.chainWebpack(webpackConfig => {
if (process.env.NODE_ENV === 'test') {
if (!webpackConfig.externals) {
webpackConfig.externals = []
}
webpackConfig.externals = [].concat(
webpackConfig.externals,
require('webpack-node-externals')()
)
webpackConfig.devtool = 'inline-cheap-module-source-map'
webpackConfig.merge({
devtool: 'inline-cheap-module-source-map',
externals: [require('webpack-node-externals')()]
})
}
})

Expand Down

0 comments on commit 957e08d

Please sign in to comment.