Skip to content

Commit

Permalink
feat(app-vue): add support for tsx
Browse files Browse the repository at this point in the history
Previous to this change vue file paths get `ts` suffix. However; if using `<script lang="tsx">` we want `tsx` to be the suffix, this change adds `tsx` as a test rule and applies `appendTsxSuffixTo`
  • Loading branch information
blake-newman committed Aug 12, 2020
1 parent 939a215 commit 071982f
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion app/vue/src/server/framework-preset-vue.ts
Expand Up @@ -15,7 +15,7 @@ export function webpack(config: Configuration) {
options: {},
},
{
test: /\.tsx?$/,
test: /\.ts$/,
use: [
{
loader: require.resolve('ts-loader'),
Expand All @@ -26,6 +26,18 @@ export function webpack(config: Configuration) {
},
],
},
{
test: /\.tsx$/,
use: [
{
loader: require.resolve('ts-loader'),
options: {
transpileOnly: true,
appendTsxSuffixTo: [/\.vue$/],
},
},
],
},
],
},
resolve: {
Expand Down

0 comments on commit 071982f

Please sign in to comment.