fix(typescript): ensure ts-loader options can be stringified for thread-loader

close #1367
This commit is contained in:
Evan You
2018-05-28 12:15:29 -04:00
parent 1e98d96376
commit 023e0226a1

View File

@@ -41,7 +41,7 @@ module.exports = (api, options) => {
loader: 'ts-loader',
options: {
transpileOnly: true,
appendTsSuffixTo: [/\.vue$/],
appendTsSuffixTo: ['\\.vue$'],
// https://github.com/TypeStrong/ts-loader#happypackmode-boolean-defaultfalse
happyPackMode: useThreads
}
@@ -50,7 +50,7 @@ module.exports = (api, options) => {
tsxRule.use('ts-loader').loader('ts-loader').tap(options => {
options = Object.assign({}, options)
delete options.appendTsSuffixTo
options.appendTsxSuffixTo = [/\.vue$/]
options.appendTsxSuffixTo = ['\\.vue$']
return options
})