We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3dd38da commit 718ba3cCopy full SHA for 718ba3c
packages/@vue/cli-plugin-typescript/index.js
@@ -40,6 +40,20 @@ module.exports = (api, {
40
options.loaders = options.loaders || {}
41
options.loaders.ts = options.loaders.ts || []
42
options.loaders.ts.push(loader)
43
+ options.loaders.tsx = options.loaders.tsx || []
44
+ if (loader.loader === 'ts-loader') {
45
+ // for TSX need to append tsx suffix
46
+ options.loaders.tsx.push({
47
+ loader: 'ts-loader',
48
+ options: {
49
+ transpileOnly: true,
50
+ appendTsxSuffixTo: [/\.vue$/],
51
+ happyPackMode: useThreads
52
+ }
53
+ })
54
+ } else {
55
+ options.loaders.tsx.push(loader)
56
57
return options
58
})
59
}
0 commit comments