tweak ts setup

This commit is contained in:
Evan You
2018-01-11 01:55:08 -05:00
parent 18036a3213
commit 957e08d3f0
3 changed files with 10 additions and 21 deletions
@@ -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')
+5 -9
View File
@@ -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')()]
})
}
})