mirror of
https://github.com/withastro/astro.git
synced 2024-12-16 21:46:22 -05:00
[ci] format
This commit is contained in:
parent
d7688f05c2
commit
88974f8b40
1 changed files with 105 additions and 100 deletions
|
@ -72,7 +72,8 @@ export function rollupPluginAstroBuildCSS(options: PluginOptions): VitePlugin[]
|
|||
const CSS_PLUGIN_NAME = '@astrojs/rollup-plugin-build-css';
|
||||
const CSS_MINIFY_PLUGIN_NAME = '@astrojs/rollup-plugin-build-css-minify';
|
||||
|
||||
return [{
|
||||
return [
|
||||
{
|
||||
name: CSS_PLUGIN_NAME,
|
||||
|
||||
configResolved(resolvedConfig) {
|
||||
|
@ -80,7 +81,9 @@ export function rollupPluginAstroBuildCSS(options: PluginOptions): VitePlugin[]
|
|||
// The bundles before vite:css-post sees them. We can remove this code
|
||||
// after this bug is fixed: https://github.com/vitejs/vite/issues/8330
|
||||
const plugins = resolvedConfig.plugins as VitePlugin[];
|
||||
const viteCSSPostIndex = resolvedConfig.plugins.findIndex((p) => p.name === 'vite:css-post');
|
||||
const viteCSSPostIndex = resolvedConfig.plugins.findIndex(
|
||||
(p) => p.name === 'vite:css-post'
|
||||
);
|
||||
if (viteCSSPostIndex !== -1) {
|
||||
// Move our plugin to be right before this one.
|
||||
const ourIndex = plugins.findIndex((p) => p.name === CSS_PLUGIN_NAME);
|
||||
|
@ -169,7 +172,8 @@ export function rollupPluginAstroBuildCSS(options: PluginOptions): VitePlugin[]
|
|||
}
|
||||
}
|
||||
},
|
||||
}, {
|
||||
},
|
||||
{
|
||||
name: CSS_MINIFY_PLUGIN_NAME,
|
||||
enforce: 'post',
|
||||
async generateBundle(_outputOptions, bundle) {
|
||||
|
@ -189,6 +193,7 @@ export function rollupPluginAstroBuildCSS(options: PluginOptions): VitePlugin[]
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}];
|
||||
},
|
||||
},
|
||||
];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue