diff --git a/packages/astro/src/vite-plugin-build-css/index.ts b/packages/astro/src/vite-plugin-build-css/index.ts index 6656d350e..830904ba7 100644 --- a/packages/astro/src/vite-plugin-build-css/index.ts +++ b/packages/astro/src/vite-plugin-build-css/index.ts @@ -139,7 +139,7 @@ export function rollupPluginAstroBuildCSS(options: PluginOptions): VitePlugin[] } } } - } + }, }, { name: CSS_MINIFY_PLUGIN_NAME, @@ -164,8 +164,8 @@ export function rollupPluginAstroBuildCSS(options: PluginOptions): VitePlugin[] // re-imports all modules as their namespace `import * as module1 from 'some/path'; // in order to determine if one of them is a side-effectual web component. // If we ever get rid of that feature, the code below can be removed. - for(const [imp, bindings] of Object.entries(output.importedBindings)) { - if(imp.startsWith('chunks/') && !bundle[imp] && output.code.includes(imp)) { + for (const [imp, bindings] of Object.entries(output.importedBindings)) { + if (imp.startsWith('chunks/') && !bundle[imp] && output.code.includes(imp)) { // This just creates an empty chunk module so that the main entry module // that is importing it doesn't break. const depChunk: OutputChunk = { @@ -173,7 +173,9 @@ export function rollupPluginAstroBuildCSS(options: PluginOptions): VitePlugin[] fileName: imp, name: imp, facadeModuleId: imp, - code: `/* Pure CSS chunk ${imp} */ ${bindings.map(b => `export const ${b} = {};`)}`, + code: `/* Pure CSS chunk ${imp} */ ${bindings.map( + (b) => `export const ${b} = {};` + )}`, dynamicImports: [], implicitlyLoadedBefore: [], importedBindings: {}, @@ -191,7 +193,7 @@ export function rollupPluginAstroBuildCSS(options: PluginOptions): VitePlugin[] } } } - } - } + }, + }, ]; }