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

fix: return partial config from vite config hook #27

Merged
merged 1 commit into from
Jan 29, 2023

Conversation

stevezhu
Copy link
Contributor

Because vite deeply merges configs, returning the entire config from the config hook should be avoided. Instead return the partial config with alias entries.

Reference: https://vitejs.dev/guide/api-plugin.html#config

Because vite deeply merges configs, returning the entire config from the config hook should be avoided.
Instead return the partial config with alias entries.

Reference: https://vitejs.dev/guide/api-plugin.html#config
@stevezhu
Copy link
Contributor Author

This was causing issues in storybookjs/storybook#20643

@IanVS
Copy link

IanVS commented Jan 20, 2023

I tested this change locally by replicating in my node_modules, and it does indeed fix the HMR issue in dev. @crcong would you consider merging and releasing a new version so that we can continue to use this plugin in Storybook? Thanks for your hard work here, it was just what we needed (if this issue can be fixed).

@stevezhu
Copy link
Contributor Author

Related original issue #5

@crcong
Copy link
Owner

crcong commented Jan 30, 2023

Thanks!

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.

3 participants