diff options
author | 2022-06-06 22:28:04 +0000 | |
---|---|---|
committer | 2022-06-06 22:28:04 +0000 | |
commit | e8b2d829b4117a46b9ea1ba56db25fdf8d532fab (patch) | |
tree | 096e1d48b473531ace0c0a459d9d485be19675b3 | |
parent | 51c60de76cf8dd8b589cb7ae61d43159a83ef03d (diff) | |
download | astro-e8b2d829b4117a46b9ea1ba56db25fdf8d532fab.tar.gz astro-e8b2d829b4117a46b9ea1ba56db25fdf8d532fab.tar.zst astro-e8b2d829b4117a46b9ea1ba56db25fdf8d532fab.zip |
[ci] format
-rw-r--r-- | packages/astro/src/vite-plugin-build-css/index.ts | 14 |
1 files changed, 8 insertions, 6 deletions
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[] } } } - } - } + }, + }, ]; } |