fix(vite): transform virtual templates (#4512)

This commit is contained in:
Daniel Roe 2022-04-22 09:32:26 +01:00 committed by GitHub
parent 664aa970d0
commit 648a70e97b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,7 +1,7 @@
import { dirname, isAbsolute, join, resolve } from 'pathe' import { dirname, isAbsolute, join, resolve } from 'pathe'
import type { Plugin } from 'rollup' import type { Plugin } from 'rollup'
const PREFIX = '\0virtual:' const PREFIX = 'virtual:'
export default function virtual (vfs: Record<string, string>): Plugin { export default function virtual (vfs: Record<string, string>): Plugin {
const extensions = ['', '.ts', '.vue', '.mjs', '.cjs', '.js', '.json'] const extensions = ['', '.ts', '.vue', '.mjs', '.cjs', '.js', '.json']