Skip to content

Commit

Permalink
feat: add marko file extensions (vitejs#3073)
Browse files Browse the repository at this point in the history
  • Loading branch information
DylanPiercey authored and TobiasMelen committed May 3, 2021
1 parent 65d8e4b commit 6187b3f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/vite/src/node/optimizer/esbuildDepPlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ const externalTypes = [
// known SFC types
'vue',
'svelte',
'marko',
// JSX/TSX may be configured to be compiled differently from how esbuild
// handles it by default, so exclude them as well
'jsx',
Expand Down
2 changes: 1 addition & 1 deletion packages/vite/src/node/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export const isExternalUrl = (url: string): boolean => externalRE.test(url)
export const dataUrlRE = /^\s*data:/i
export const isDataUrl = (url: string): boolean => dataUrlRE.test(url)

const knownJsSrcRE = /\.((j|t)sx?|mjs|vue)($|\?)/
const knownJsSrcRE = /\.((j|t)sx?|mjs|vue|marko)($|\?)/
export const isJSRequest = (url: string): boolean => {
if (knownJsSrcRE.test(url)) {
return true
Expand Down

0 comments on commit 6187b3f

Please sign in to comment.