Revert "attempt: externalize resolution with "pre""
This reverts commit 46b808e6bb4446ed115f46348edefb2021a027bd.
This commit is contained in:
parent
2fb0b68a12
commit
356b9ec073
2 changed files with 0 additions and 22 deletions
|
@ -6,7 +6,6 @@ import { builtinModules, createRequire } from 'module';
|
||||||
import { fileURLToPath } from 'url';
|
import { fileURLToPath } from 'url';
|
||||||
import vite from './vite.js';
|
import vite from './vite.js';
|
||||||
import astroVitePlugin from '../vite-plugin-astro/index.js';
|
import astroVitePlugin from '../vite-plugin-astro/index.js';
|
||||||
import externalVitePlugin from '../vite-plugin-external/index.js';
|
|
||||||
import astroPostprocessVitePlugin from '../vite-plugin-astro-postprocess/index.js';
|
import astroPostprocessVitePlugin from '../vite-plugin-astro-postprocess/index.js';
|
||||||
import configAliasVitePlugin from '../vite-plugin-config-alias/index.js';
|
import configAliasVitePlugin from '../vite-plugin-config-alias/index.js';
|
||||||
import markdownVitePlugin from '../vite-plugin-markdown/index.js';
|
import markdownVitePlugin from '../vite-plugin-markdown/index.js';
|
||||||
|
@ -55,7 +54,6 @@ export async function createVite(inlineConfig: ViteConfigWithSSR, { astroConfig,
|
||||||
exclude: [...ALWAYS_EXTERNAL],
|
exclude: [...ALWAYS_EXTERNAL],
|
||||||
},
|
},
|
||||||
plugins: [
|
plugins: [
|
||||||
externalVitePlugin({ config: astroConfig }),
|
|
||||||
configAliasVitePlugin({ config: astroConfig }),
|
configAliasVitePlugin({ config: astroConfig }),
|
||||||
astroVitePlugin({ config: astroConfig, devServer, logging }),
|
astroVitePlugin({ config: astroConfig, devServer, logging }),
|
||||||
markdownVitePlugin({ config: astroConfig, devServer }),
|
markdownVitePlugin({ config: astroConfig, devServer }),
|
||||||
|
|
|
@ -1,20 +0,0 @@
|
||||||
import type vite from '../core/vite';
|
|
||||||
import type { AstroConfig } from '../@types/astro';
|
|
||||||
|
|
||||||
interface AstroPluginOptions {
|
|
||||||
config: AstroConfig;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Transform .astro files for Vite */
|
|
||||||
export default function astro({ config }: AstroPluginOptions): vite.Plugin {
|
|
||||||
return {
|
|
||||||
name: '@astrojs/vite-plugin-external',
|
|
||||||
enforce: 'pre',
|
|
||||||
resolveId(source, importer, options) {
|
|
||||||
if (source.includes('.config.')) {
|
|
||||||
console.log({ source, importer, options });
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
},
|
|
||||||
};
|
|
||||||
}
|
|
Loading…
Add table
Reference in a new issue