Skip to content

Commit 6af840b

Browse files
authored
fix: compatible with vue-loader experimentalInlineMatchResource
1 parent e3b4cb3 commit 6af840b

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,7 @@ AutoImport({
230230
/\.[tj]sx?$/, // .ts, .tsx, .js, .jsx
231231
/\.vue$/,
232232
/\.vue\?vue/, // .vue
233+
/\.vue\.[tj]sx?\?vue/, // .vue (vue-loader with experimentalInlineMatchResource enabled)
233234
/\.md$/, // .md
234235
],
235236

src/core/ctx.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ ${dts}`.trim()}\n`
101101
})
102102

103103
const filter = createFilter(
104-
options.include || [/\.[jt]sx?$/, /\.astro$/, /\.vue$/, /\.vue\?vue/, /\.svelte$/],
104+
options.include || [/\.[jt]sx?$/, /\.astro$/, /\.vue$/, /\.vue\?vue/, /\.vue\.[tj]sx?\?vue/, /\.svelte$/],
105105
options.exclude || [/[\\/]node_modules[\\/]/, /[\\/]\.git[\\/]/],
106106
)
107107
const dts = preferDTS === false

src/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ export interface Options {
202202
/**
203203
* Rules to include transforming target.
204204
*
205-
* @default [/\.[jt]sx?$/, /\.astro$/, /\.vue$/, /\.vue\?vue/, /\.svelte$/]
205+
* @default [/\.[jt]sx?$/, /\.astro$/, /\.vue$/, /\.vue\?vue/, /\.vue\.[tj]sx?\?vue/, /\.svelte$/]
206206
*/
207207
include?: FilterPattern
208208

0 commit comments

Comments
 (0)