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

feat: disable optimizer in vite-node for vite 6 compat #756

Merged
merged 1 commit into from
Oct 7, 2024

Conversation

sapphi-red
Copy link
Contributor

@sapphi-red sapphi-red commented Aug 29, 2024

Description

This PR adds optimizeDeps.include = [] and optimizeDeps.noDiscovery = true when using vite-node to make histoire pass the tests with Vite with the Environment API PR merged (vitejs/vite#16471).

Setting these options is recommended by vite-node. (optimizeDeps.disable is now deprecated and replaced with the options above.)

optimizeDeps.noDiscovery was added in Vite 5.1, but given that histoire works without that setting for Vite pre-6, using it should be fine.

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

  • If it's a new feature, provide a convincing reason to add it. Ideally, you should open a suggestion issue first and have it approved before working on it.
  • Read the Contributing Guidelines.
  • Read the Pull Request Guidelines and follow the Commit 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

stackblitz bot commented Aug 29, 2024

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

Copy link

codesandbox bot commented Aug 29, 2024

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

Copy link

netlify bot commented Aug 29, 2024

Deploy Preview for histoire-site failed.

Name Link
🔨 Latest commit 230d143
🔍 Latest deploy log https://app.netlify.com/sites/histoire-site/deploys/66d0125e9c1ed700084c54d9

Copy link

netlify bot commented Aug 29, 2024

Deploy Preview for histoire-controls failed.

Name Link
🔨 Latest commit 230d143
🔍 Latest deploy log https://app.netlify.com/sites/histoire-controls/deploys/66d0125eb2c43600081e476b

Copy link

netlify bot commented Aug 29, 2024

Deploy Preview for histoire-examples-svelte3 failed.

Name Link
🔨 Latest commit 230d143
🔍 Latest deploy log https://app.netlify.com/sites/histoire-examples-svelte3/deploys/66d0125ebe639e0008b5ecb3

Copy link

netlify bot commented Aug 29, 2024

Deploy Preview for histoire-examples-vue3 failed.

Name Link
🔨 Latest commit 230d143
🔍 Latest deploy log https://app.netlify.com/sites/histoire-examples-vue3/deploys/66d0125e5f40560008c9175b

Copy link

pkg-pr-new bot commented Aug 29, 2024

commit: 230d143

histoire

pnpm add https://pkg.pr.new/histoire-dev/histoire@756

@histoire/app

pnpm add https://pkg.pr.new/histoire-dev/histoire/@histoire/app@756

@histoire/controls

pnpm add https://pkg.pr.new/histoire-dev/histoire/@histoire/controls@756

@histoire/plugin-nuxt

pnpm add https://pkg.pr.new/histoire-dev/histoire/@histoire/plugin-nuxt@756

@histoire/plugin-percy

pnpm add https://pkg.pr.new/histoire-dev/histoire/@histoire/plugin-percy@756

@histoire/plugin-screenshot

pnpm add https://pkg.pr.new/histoire-dev/histoire/@histoire/plugin-screenshot@756

@histoire/plugin-svelte

pnpm add https://pkg.pr.new/histoire-dev/histoire/@histoire/plugin-svelte@756

@histoire/plugin-vue

pnpm add https://pkg.pr.new/histoire-dev/histoire/@histoire/plugin-vue@756

@histoire/plugin-vue2

pnpm add https://pkg.pr.new/histoire-dev/histoire/@histoire/plugin-vue2@756

@histoire/shared

pnpm add https://pkg.pr.new/histoire-dev/histoire/@histoire/shared@756

@histoire/vendors

pnpm add https://pkg.pr.new/histoire-dev/histoire/@histoire/vendors@756

Open in Stackblitz

@sapphi-red
Copy link
Contributor Author

Netlify is failing with the following error:

Installing npm packages using pnpm version ERROR: This version of pnpm requires at least Node.js v18.12
The current version of Node.js is v16.20.2

I didn't change anything related to pnpm or node version, so probably it's not broken by this PR.

@sapphi-red sapphi-red marked this pull request as ready for review August 29, 2024 07:11
@Akryum Akryum merged commit f583371 into histoire-dev:main Oct 7, 2024
12 of 16 checks passed
@sapphi-red sapphi-red deleted the feat/vite-v6-compat branch October 8, 2024 01:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants