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

refactor(playground): move to ESM module and add type check for config #12131

Merged
merged 6 commits into from
Feb 28, 2023

Conversation

fi3ework
Copy link
Member

Description

  • change all vite config files in the playground to ESM
  • add // @ts-check for all config files to be involved in typescheck of playground
  • use defineConfig whenever possible to get better type intellisense
  • fixed some existing trivial config type errors 😬

Additional context


What is the purpose of this pull request?

  • Bug fix
  • New Feature
  • Documentation update
  • Other

Before submitting the PR, please make sure you do the following

  • Read the Contributing Guidelines.
  • Read the Pull Request Guidelines and follow the PR Title Convention.
  • Check that there isn't already a PR that solves the problem the same way to avoid creating a duplicate.
  • Provide a description in this PR that addresses what the PR is solving, or reference the issue that it solves (e.g. fixes #123).
  • Ideally, include relevant tests that fail without this PR but pass with it.

Copy link
Member

@bluwy bluwy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for migrating this! 🙏 I suppose this supersedes #8252. I have a few comments below, and ideally we would also need to add "type": "module" to the package.json, but that brings up other minor issues too so it can be tackled later in a separate PR.

playground/alias/vite.config.js Outdated Show resolved Hide resolved
playground/assets/vite.config.js Outdated Show resolved Hide resolved
playground/css/vite.config.js Outdated Show resolved Hide resolved
playground/define/vite.config.js Outdated Show resolved Hide resolved
playground/lib/vite.config.js Outdated Show resolved Hide resolved
playground/worker/vite.config-sourcemap.js Outdated Show resolved Hide resolved
@bluwy bluwy added p1-chore Doesn't change code behavior (priority) test labels Feb 25, 2023
@fi3ework fi3ework force-pushed the add-type-check-for-playground branch from db8de68 to 99c4ebe Compare February 26, 2023 14:39
Copy link
Member

@bluwy bluwy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Greatly appreciate the refactors!

Copy link
Member

@sapphi-red sapphi-red left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks 💚

@patak-dev patak-dev merged commit f6fdc56 into vitejs:main Feb 28, 2023
@fi3ework fi3ework mentioned this pull request May 5, 2023
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p1-chore Doesn't change code behavior (priority) test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants