mirror of
https://github.com/withastro/astro.git
synced 2025-03-31 23:31:30 -05:00
Make vite-plugin-fileurl a pre plugin (#11822)
This commit is contained in:
parent
a3b9b91caf
commit
6fcaab84de
3 changed files with 8 additions and 2 deletions
5
.changeset/fuzzy-falcons-tan.md
Normal file
5
.changeset/fuzzy-falcons-tan.md
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
'astro': patch
|
||||
---
|
||||
|
||||
Marks internal `vite-plugin-fileurl` plugin with `enforce: 'pre'`
|
|
@ -151,7 +151,7 @@ export async function createVite(
|
|||
astroPrefetch({ settings }),
|
||||
astroTransitions({ settings }),
|
||||
astroDevToolbar({ settings, logger }),
|
||||
vitePluginFileURL({}),
|
||||
vitePluginFileURL(),
|
||||
astroInternationalization({ settings }),
|
||||
settings.config.experimental.serverIslands && vitePluginServerIslands({ settings }),
|
||||
astroContainer(),
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
import type { Plugin as VitePlugin } from 'vite';
|
||||
|
||||
export default function vitePluginFileURL({}): VitePlugin {
|
||||
export default function vitePluginFileURL(): VitePlugin {
|
||||
return {
|
||||
name: 'astro:vite-plugin-file-url',
|
||||
enforce: 'pre',
|
||||
resolveId(source, importer) {
|
||||
if (source.startsWith('file://')) {
|
||||
const rest = source.slice(7);
|
||||
|
|
Loading…
Add table
Reference in a new issue