[ci] yarn format
This commit is contained in:
parent
a7967530df
commit
bd931a0a14
4 changed files with 7 additions and 9 deletions
|
@ -59,10 +59,10 @@ export async function staticBuild(opts: StaticBuildOptions) {
|
|||
const facadeIdToPageDataMap = new Map<string, PageBuildData>();
|
||||
|
||||
// Collects polyfills and passes them as top-level inputs
|
||||
const polyfills = getRenderers(opts).flatMap(renderer => {
|
||||
const polyfills = getRenderers(opts).flatMap((renderer) => {
|
||||
return (renderer.polyfills || []).concat(renderer.hydrationPolyfills || []);
|
||||
});
|
||||
for(const polyfill of polyfills) {
|
||||
for (const polyfill of polyfills) {
|
||||
jsInput.add(polyfill);
|
||||
}
|
||||
|
||||
|
|
|
@ -120,7 +120,9 @@ export async function generateHydrateScript(scriptOptions: HydrateScriptOptions,
|
|||
|
||||
let hydrationSource = '';
|
||||
if (renderer.hydrationPolyfills) {
|
||||
hydrationSource += `await Promise.all([${(await Promise.all(renderer.hydrationPolyfills.map(async (src: string) => `\n import("${await result.resolve(src)}")`))).join(', ')}]);\n`;
|
||||
hydrationSource += `await Promise.all([${(await Promise.all(renderer.hydrationPolyfills.map(async (src: string) => `\n import("${await result.resolve(src)}")`))).join(
|
||||
', '
|
||||
)}]);\n`;
|
||||
}
|
||||
|
||||
hydrationSource += renderer.source
|
||||
|
|
|
@ -12,11 +12,7 @@ describe('Static build - frameworks', () => {
|
|||
before(async () => {
|
||||
fixture = await loadFixture({
|
||||
projectRoot: './fixtures/static-build-frameworks/',
|
||||
renderers: [
|
||||
'@astrojs/renderer-preact',
|
||||
'@astrojs/renderer-react',
|
||||
'@astrojs/renderer-lit'
|
||||
],
|
||||
renderers: ['@astrojs/renderer-preact', '@astrojs/renderer-react', '@astrojs/renderer-lit'],
|
||||
buildOptions: {
|
||||
experimentalStaticBuild: true,
|
||||
},
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { installWindowOnGlobal } from "@lit-labs/ssr/lib/dom-shim.js";
|
||||
import { installWindowOnGlobal } from '@lit-labs/ssr/lib/dom-shim.js';
|
||||
installWindowOnGlobal();
|
||||
|
||||
window.global = window;
|
||||
|
|
Loading…
Reference in a new issue