[ci] format
This commit is contained in:
parent
51c60de76c
commit
e8b2d829b4
1 changed files with 8 additions and 6 deletions
|
@ -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[]
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue