-
Notifications
You must be signed in to change notification settings - Fork 106
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
[Bug] Can't import @vitejs/plugin-vue2 properly when using vue2.7 #506
Comments
Doh, you're right, not sure why I thought that would work. I'll fix it up, but for now, I think you could use |
I can confirm changing it to |
😬 I'll try to get a fix out as soon as I can. |
Really appreciate |
Fixes: #506 This corrects the vue 2.6 / 2.7 logic, and also finds a slightly-better way to handle module resolution from within `builder-vite` when running examples. Instead of adding dev dependencies into the builder, this sets a `node_path` environment variable, so that the node_modules of the example is used as a global lookup from within the builder.
Describe the Bug
I got this error message while I'm using vue2.7 and @storybook/[email protected]:
It seems that @storybook/[email protected] has resolved the problems(#503) about compatibility between vue2.6&2.7, which can auto import @vitejs/plugin-vue2 when using vue2.7, but actually not. I tried to print a log as below:
but the result is false:
Link to Minimal Reproducible Example
https://codesandbox.io/s/storybook-builder-vite-0-2-3s-bug-wtyj2u?file=/package.json
What version of
vite
are you using?3.1.0
System info and storybook versions
System:
OS: macOS 12.6
CPU: (8) arm64 Apple M1
Binaries:
Node: 16.16.0 - ~/.nvm/versions/node/v16.16.0/bin/node
Yarn: 1.22.19 - ~/.pnpm/yarn
npm: 8.11.0 - ~/.nvm/versions/node/v16.16.0/bin/npm
Browsers:
Chrome: 105.0.5195.125
Safari: 16.0
npmPackages:
@storybook/addon-actions: ^6.5.12 => 6.5.12
@storybook/addon-backgrounds: ^6.5.12 => 6.5.12
@storybook/addon-docs: ^6.5.12 => 6.5.12
@storybook/addon-essentials: ^6.5.12 => 6.5.12
@storybook/addon-links: ^6.5.12 => 6.5.12
@storybook/addon-measure: ^6.5.12 => 6.5.12
@storybook/addon-outline: ^6.5.12 => 6.5.12
@storybook/builder-vite: ^0.2.3 => 0.2.3
@storybook/client-api: ^6.5.12 => 6.5.12
@storybook/client-logger: ^6.5.12 => 6.5.12
@storybook/core-common: ^6.5.12 => 6.5.12
@storybook/node-logger: ^6.5.12 => 6.5.12
@storybook/vue: ^6.5.12 => 6.5.12
Participation
The text was updated successfully, but these errors were encountered: