mirror of
https://github.com/vuejs/vue-cli.git
synced 2026-02-08 16:08:27 -06:00
fix(typescript): ensure ts-loader options can be stringified for thread-loader
close #1367
This commit is contained in:
@@ -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
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user