Skip to content

Commit

Permalink
Fix broken build
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewp committed Dec 5, 2022
1 parent 88b8046 commit d839c59
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 150 deletions.
1 change: 1 addition & 0 deletions packages/astro/src/jsx/babel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ export default function astroJSX(): PluginObj {
clientOnlyComponents: [],
hydratedComponents: [],
scripts: [],
headInjection: 'none',
};
}
path.node.body.splice(
Expand Down
146 changes: 0 additions & 146 deletions packages/astro/src/runtime/server/render/astro.ts

This file was deleted.

4 changes: 2 additions & 2 deletions packages/astro/src/runtime/server/render/astro/instance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ export class AstroComponentInstance {
}
}

// In dev mode, check props and make sure they are valid for an Astro component
// Issue warnings for invalid props for Astro components
function validateComponentProps(props: any, displayName: string) {
if (import.meta.env?.DEV && props != null) {
if (props != null) {
for (const prop of Object.keys(props)) {
if (HydrationDirectiveProps.has(prop)) {
// eslint-disable-next-line
Expand Down
4 changes: 2 additions & 2 deletions packages/astro/src/runtime/server/render/head.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ export function renderHead(result: SSRResult) {
// This accommodates the fact that using a <head> is optional in Astro, so this
// is called before a component's first non-head HTML element. If the head was
// already injected it is a noop.
export async function* maybeRenderHead(result: SSRResult): AsyncIterable<string> {
export async function* maybeRenderHead(result: SSRResult) {
if (result._metadata.hasRenderedHead) {
return;
}
yield renderHead(result);
yield renderHead(result)();
}
2 changes: 2 additions & 0 deletions packages/astro/src/vite-plugin-markdown-legacy/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ ${setup}`.trim();
viteConfig: resolvedConfig,
filename,
source: astroResult,
id,
};

let transformResult = await cachedCompilation(compileProps);
Expand All @@ -234,6 +235,7 @@ ${tsResult}`;
clientOnlyComponents: transformResult.clientOnlyComponents,
hydratedComponents: transformResult.hydratedComponents,
scripts: transformResult.scripts,
headInjection: 'none'
};

return {
Expand Down
1 change: 1 addition & 0 deletions packages/astro/src/vite-plugin-markdown/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ export default function markdown({ settings, logging }: AstroPluginOptions): Plu
hydratedComponents: [],
clientOnlyComponents: [],
scripts: [],
headInjection: 'none',
} as PluginMetadata['astro'],
vite: {
lang: 'ts',
Expand Down

0 comments on commit d839c59

Please sign in to comment.