summaryrefslogtreecommitdiff
path: root/packages/astro/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--packages/astro/src/@types/astro.ts6
-rw-r--r--packages/astro/src/core/app/ssrPipeline.ts2
-rw-r--r--packages/astro/src/core/config/schema.ts43
-rw-r--r--packages/astro/src/runtime/server/render/component.ts4
4 files changed, 28 insertions, 27 deletions
diff --git a/packages/astro/src/@types/astro.ts b/packages/astro/src/@types/astro.ts
index 08a30dec4..2be15923b 100644
--- a/packages/astro/src/@types/astro.ts
+++ b/packages/astro/src/@types/astro.ts
@@ -858,10 +858,10 @@ export interface AstroUserConfig {
* @default `false`
* @deprecated Deprecated since version 3.0.
* @description
- * The build config option `build.split` has been replaced by the adapter configuration option [`functionPerRoute`](/en/reference/adapter-reference/#functionperroute).
+ * The build config option `build.split` has been replaced by the adapter configuration option [`functionPerRoute`](/en/reference/adapter-reference/#functionperroute).
*
* Please see your [SSR adapter's documentation](/en/guides/integrations-guide/#official-integrations) for using `functionPerRoute` to define how your SSR code is bundled.
- *
+ *
*/
split?: boolean;
@@ -872,7 +872,7 @@ export interface AstroUserConfig {
* @default `false`
* @deprecated Deprecated since version 3.0.
* @description
- * The build config option `build.excludeMiddleware` has been replaced by the adapter configuration option [`edgeMiddleware`](/en/reference/adapter-reference/#edgemiddleware).
+ * The build config option `build.excludeMiddleware` has been replaced by the adapter configuration option [`edgeMiddleware`](/en/reference/adapter-reference/#edgemiddleware).
*
* Please see your [SSR adapter's documentation](/en/guides/integrations-guide/#official-integrations) for using `edgeMiddleware` to define whether or not any SSR middleware code will be bundled when built.
*/
diff --git a/packages/astro/src/core/app/ssrPipeline.ts b/packages/astro/src/core/app/ssrPipeline.ts
index 6ee135197..fa354becf 100644
--- a/packages/astro/src/core/app/ssrPipeline.ts
+++ b/packages/astro/src/core/app/ssrPipeline.ts
@@ -23,6 +23,6 @@ export class SSRRoutePipeline extends Pipeline {
if (response.headers.get('X-Astro-Response') === 'Not-Found') {
throw new EndpointNotFoundError(response);
}
- return response
+ return response;
}
}
diff --git a/packages/astro/src/core/config/schema.ts b/packages/astro/src/core/config/schema.ts
index 0717e1a81..1c5412d14 100644
--- a/packages/astro/src/core/config/schema.ts
+++ b/packages/astro/src/core/config/schema.ts
@@ -380,29 +380,30 @@ export function createRelativeSchema(cmd: string, fileProtocolRoot: string) {
.optional()
.default({})
),
- }).transform((config) => {
- // If the user changed outDir but not build.server, build.config, adjust so those
- // are relative to the outDir, as is the expected default.
- if (
- !config.build.server.toString().startsWith(config.outDir.toString()) &&
- config.build.server.toString().endsWith('dist/server/')
- ) {
- config.build.server = new URL('./dist/server/', config.outDir);
- }
- if (
- !config.build.client.toString().startsWith(config.outDir.toString()) &&
- config.build.client.toString().endsWith('dist/client/')
- ) {
- config.build.client = new URL('./dist/client/', config.outDir);
- }
+ })
+ .transform((config) => {
+ // If the user changed outDir but not build.server, build.config, adjust so those
+ // are relative to the outDir, as is the expected default.
+ if (
+ !config.build.server.toString().startsWith(config.outDir.toString()) &&
+ config.build.server.toString().endsWith('dist/server/')
+ ) {
+ config.build.server = new URL('./dist/server/', config.outDir);
+ }
+ if (
+ !config.build.client.toString().startsWith(config.outDir.toString()) &&
+ config.build.client.toString().endsWith('dist/client/')
+ ) {
+ config.build.client = new URL('./dist/client/', config.outDir);
+ }
- // Handle `base` trailing slash based on `trailingSlash` config
- if (config.trailingSlash === 'never') {
- config.base = prependForwardSlash(removeTrailingForwardSlash(config.base));
+ // Handle `base` trailing slash based on `trailingSlash` config
+ if (config.trailingSlash === 'never') {
+ config.base = prependForwardSlash(removeTrailingForwardSlash(config.base));
} else if (config.trailingSlash === 'always') {
- config.base = prependForwardSlash(appendForwardSlash(config.base));
- } else {
- config.base = prependForwardSlash(config.base);
+ config.base = prependForwardSlash(appendForwardSlash(config.base));
+ } else {
+ config.base = prependForwardSlash(config.base);
}
return config;
diff --git a/packages/astro/src/runtime/server/render/component.ts b/packages/astro/src/runtime/server/render/component.ts
index 36528daf1..c92316d13 100644
--- a/packages/astro/src/runtime/server/render/component.ts
+++ b/packages/astro/src/runtime/server/render/component.ts
@@ -481,9 +481,9 @@ function normalizeProps(props: Record<string, any>): Record<string, any> {
if (props['class:list'] !== undefined) {
const value = props['class:list'];
delete props['class:list'];
- props['class'] = clsx(props['class'], value)
+ props['class'] = clsx(props['class'], value);
if (props['class'] === '') {
- delete props['class']
+ delete props['class'];
}
}
return props;