Skip to content

Commit 45595ef

Browse files
patak-devbluwymarkdalgleish
authored
feat: backport mdx as known js source (#14560) (#14670)
Co-authored-by: Bjorn Lu <[email protected]> Co-authored-by: Mark Dalgleish <[email protected]>
1 parent 520139c commit 45595ef

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/vite/src/node/utils.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,8 @@ export const isDataUrl = (url: string): boolean => dataUrlRE.test(url)
290290
export const virtualModuleRE = /^virtual-module:.*/
291291
export const virtualModulePrefix = 'virtual-module:'
292292

293-
const knownJsSrcRE = /\.(?:[jt]sx?|m[jt]s|vue|marko|svelte|astro|imba)(?:$|\?)/
293+
const knownJsSrcRE =
294+
/\.(?:[jt]sx?|m[jt]s|vue|marko|svelte|astro|imba|mdx)(?:$|\?)/
294295
export const isJSRequest = (url: string): boolean => {
295296
url = cleanUrl(url)
296297
if (knownJsSrcRE.test(url)) {

0 commit comments

Comments
 (0)