mirror of
https://github.com/vuejs/vue-cli.git
synced 2026-04-24 22:09:54 -05:00
tweak ts setup
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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')
|
||||
|
||||
@@ -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')()]
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user