Skip to content

Commit b823fd6

Browse files
authored
feat: Add support for imba in html scripts (#10679)
1 parent 675bf07 commit b823fd6

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

packages/vite/src/node/optimizer/esbuildDepPlugin.ts

+1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ const externalTypes = [
3434
'svelte',
3535
'marko',
3636
'astro',
37+
'imba',
3738
// JSX/TSX may be configured to be compiled differently from how esbuild
3839
// handles it by default, so exclude them as well
3940
'jsx',

packages/vite/src/node/optimizer/scan.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ type ResolveIdOptions = Parameters<PluginContainer['resolveId']>[2]
2929

3030
const debug = createDebugger('vite:deps')
3131

32-
const htmlTypesRE = /\.(html|vue|svelte|astro)$/
32+
const htmlTypesRE = /\.(html|vue|svelte|astro|imba)$/
3333

3434
// A simple regex to detect import sources. This is only used on
3535
// <script lang="ts"> blocks in vue (setup only) or svelte files, since

packages/vite/src/node/utils.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ export const isDataUrl = (url: string): boolean => dataUrlRE.test(url)
276276
export const virtualModuleRE = /^virtual-module:.*/
277277
export const virtualModulePrefix = 'virtual-module:'
278278

279-
const knownJsSrcRE = /\.((j|t)sx?|m[jt]s|vue|marko|svelte|astro)($|\?)/
279+
const knownJsSrcRE = /\.((j|t)sx?|m[jt]s|vue|marko|svelte|astro|imba)($|\?)/
280280
export const isJSRequest = (url: string): boolean => {
281281
url = cleanUrl(url)
282282
if (knownJsSrcRE.test(url)) {

0 commit comments

Comments
 (0)