Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: resolve ssr options #8455

Merged
merged 1 commit into from
Jun 3, 2022
Merged

chore: resolve ssr options #8455

merged 1 commit into from
Jun 3, 2022

Conversation

antfu
Copy link
Member

@antfu antfu commented Jun 3, 2022

This PR adds a resolve function for SSR options to set the default. It allows plugin to know the target format:

const myPlugin = {
  configResolved(config) {
    const isESM = config.ssr?.format === 'esm'
  }
}

Otherwise, it was always undefined unless explicitly set, but the default is different in v2 and v3. This PR makes it easier for plugins to get the format without relying on checking Vite's version.

@antfu antfu added the p3-downstream-blocker Blocking the downstream ecosystem to work properly (priority) label Jun 3, 2022
@patak-dev patak-dev merged commit d97e402 into main Jun 3, 2022
@patak-dev patak-dev deleted the chore/resolve-ssr-options branch June 3, 2022 14:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p3-downstream-blocker Blocking the downstream ecosystem to work properly (priority)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants