Skip to content

Commit

Permalink
chore: cleanup rebase errors
Browse files Browse the repository at this point in the history
  • Loading branch information
natemoo-re committed Jun 5, 2023
1 parent 9027798 commit b84aabf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 76 deletions.
60 changes: 0 additions & 60 deletions packages/astro/src/@types/astro.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1166,66 +1166,6 @@ export interface AstroUserConfig {
*/
assets?: boolean;

/**
* @docs
* @name experimental.inlineStylesheets
* @type {('always' | 'auto' | 'never')}
* @default `never`
* @version 2.4.0
* @description
* Control whether styles are sent to the browser in a separate css file or inlined into `<style>` tags. Choose from the following options:
* - `'always'` - all styles are inlined into `<style>` tags
* - `'auto'` - only stylesheets smaller than `ViteConfig.build.assetsInlineLimit` (default: 4kb) are inlined. Otherwise, styles are sent in external stylesheets.
* - `'never'` - all styles are sent in external stylesheets
*
* ```js
* {
* experimental: {
* inlineStylesheets: `auto`,
* },
* }
* ```
*/
inlineStylesheets?: 'always' | 'auto' | 'never';

/**
* @docs
* @name experimental.customClientDirectives
* @type {boolean}
* @default `false`
* @version 2.5.0
* @description
* Enable experimental support for hybrid SSR with pre-rendering enabled by default.
*
* To enable this feature, first set `experimental.hybridOutput` to `true` in your Astro config, and set `output` to `hybrid`.
*
* ```js
* {
* output: 'hybrid',
* experimental: {
* hybridOutput: true,
* },
* }
* ```
* Then add `export const prerender = false` to any page or endpoint you want to opt-out of pre-rendering.
* ```astro
* ---
* // pages/contact.astro
* export const prerender = false
*
* if (Astro.request.method === 'POST') {
* // handle form submission
* }
* ---
* <form method="POST">
* <input type="text" name="name" />
* <input type="email" name="email" />
* <button type="submit">Submit</button>
* </form>
* ```
*/
hybridOutput?: boolean;

/**
* @docs
* @name experimental.redirects
Expand Down
18 changes: 2 additions & 16 deletions packages/astro/src/core/config/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,7 @@ const ASTRO_CONFIG_DEFAULTS: AstroUserConfig & any = {
redirects: {},
experimental: {
assets: false,
hybridOutput: false,
redirects: false,
customClientDirectives: false,
inlineStylesheets: 'never',
middleware: false,
redirects: false
},
};

Expand Down Expand Up @@ -209,17 +205,7 @@ export const AstroConfigSchema = z.object({
experimental: z
.object({
assets: z.boolean().optional().default(ASTRO_CONFIG_DEFAULTS.experimental.assets),
hybridOutput: z.boolean().optional().default(ASTRO_CONFIG_DEFAULTS.experimental.hybridOutput),
redirects: z.boolean().optional().default(ASTRO_CONFIG_DEFAULTS.experimental.redirects),
customClientDirectives: z
.boolean()
.optional()
.default(ASTRO_CONFIG_DEFAULTS.experimental.customClientDirecives),
inlineStylesheets: z
.enum(['always', 'auto', 'never'])
.optional()
.default(ASTRO_CONFIG_DEFAULTS.experimental.inlineStylesheets),
middleware: z.oboolean().optional().default(ASTRO_CONFIG_DEFAULTS.experimental.middleware),
redirects: z.boolean().optional().default(ASTRO_CONFIG_DEFAULTS.experimental.redirects)
})
.passthrough()
.refine(
Expand Down

0 comments on commit b84aabf

Please sign in to comment.