Skip to content

Commit 023e022

Browse files
committed
fix(typescript): ensure ts-loader options can be stringified for thread-loader
close vuejs#1367
1 parent 1e98d96 commit 023e022

File tree

1 file changed

+2
-2
lines changed
  • packages/@vue/cli-plugin-typescript

1 file changed

+2
-2
lines changed

packages/@vue/cli-plugin-typescript/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ module.exports = (api, options) => {
4141
loader: 'ts-loader',
4242
options: {
4343
transpileOnly: true,
44-
appendTsSuffixTo: [/\.vue$/],
44+
appendTsSuffixTo: ['\\.vue$'],
4545
// https://github.com/TypeStrong/ts-loader#happypackmode-boolean-defaultfalse
4646
happyPackMode: useThreads
4747
}
@@ -50,7 +50,7 @@ module.exports = (api, options) => {
5050
tsxRule.use('ts-loader').loader('ts-loader').tap(options => {
5151
options = Object.assign({}, options)
5252
delete options.appendTsSuffixTo
53-
options.appendTsxSuffixTo = [/\.vue$/]
53+
options.appendTsxSuffixTo = ['\\.vue$']
5454
return options
5555
})
5656

0 commit comments

Comments
 (0)