[ci] format
This commit is contained in:
parent
f558a9e205
commit
6533cbea87
3 changed files with 17 additions and 6 deletions
|
@ -8,6 +8,11 @@ export const LINKS_PLACEHOLDER = '@@ASTRO-LINKS@@';
|
||||||
export const STYLES_PLACEHOLDER = '@@ASTRO-STYLES@@';
|
export const STYLES_PLACEHOLDER = '@@ASTRO-STYLES@@';
|
||||||
export const SCRIPTS_PLACEHOLDER = '@@ASTRO-SCRIPTS@@';
|
export const SCRIPTS_PLACEHOLDER = '@@ASTRO-SCRIPTS@@';
|
||||||
|
|
||||||
export const CONTENT_FLAGS = [CONTENT_FLAG, CONTENT_RENDER_FLAG, DATA_FLAG, PROPAGATED_ASSET_FLAG] as const;
|
export const CONTENT_FLAGS = [
|
||||||
|
CONTENT_FLAG,
|
||||||
|
CONTENT_RENDER_FLAG,
|
||||||
|
DATA_FLAG,
|
||||||
|
PROPAGATED_ASSET_FLAG,
|
||||||
|
] as const;
|
||||||
|
|
||||||
export const CONTENT_TYPES_FILE = 'types.d.ts';
|
export const CONTENT_TYPES_FILE = 'types.d.ts';
|
||||||
|
|
|
@ -60,7 +60,9 @@ export async function* crawlGraph(
|
||||||
if (entryIsStyle && !isCSSRequest(importedModulePathname)) {
|
if (entryIsStyle && !isCSSRequest(importedModulePathname)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
const isFileTypeNeedingSSR = fileExtensionsToSSR.has(npath.extname(importedModulePathname));
|
const isFileTypeNeedingSSR = fileExtensionsToSSR.has(
|
||||||
|
npath.extname(importedModulePathname)
|
||||||
|
);
|
||||||
if (
|
if (
|
||||||
isFileTypeNeedingSSR &&
|
isFileTypeNeedingSSR &&
|
||||||
// Should not SSR a module with ?astroPropagatedAssets
|
// Should not SSR a module with ?astroPropagatedAssets
|
||||||
|
|
|
@ -48,10 +48,14 @@ export const ComponentNode = createComponent({
|
||||||
links = '',
|
links = '',
|
||||||
scripts = '';
|
scripts = '';
|
||||||
if (Array.isArray(treeNode.collectedStyles)) {
|
if (Array.isArray(treeNode.collectedStyles)) {
|
||||||
styles = treeNode.collectedStyles.map((style: any) => renderUniqueStylesheet({
|
styles = treeNode.collectedStyles
|
||||||
type: 'inline',
|
.map((style: any) =>
|
||||||
content: style,
|
renderUniqueStylesheet({
|
||||||
})).join('');
|
type: 'inline',
|
||||||
|
content: style,
|
||||||
|
})
|
||||||
|
)
|
||||||
|
.join('');
|
||||||
}
|
}
|
||||||
if (Array.isArray(treeNode.collectedLinks)) {
|
if (Array.isArray(treeNode.collectedLinks)) {
|
||||||
links = treeNode.collectedLinks
|
links = treeNode.collectedLinks
|
||||||
|
|
Loading…
Add table
Reference in a new issue