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

[Bug] build error with the 'mock-core-js' plugin #412

Closed
1 task
l1shu opened this issue Jun 16, 2022 · 2 comments · Fixed by #461
Closed
1 task

[Bug] build error with the 'mock-core-js' plugin #412

l1shu opened this issue Jun 16, 2022 · 2 comments · Fixed by #461
Labels
bug Something isn't working

Comments

@l1shu
Copy link

l1shu commented Jun 16, 2022

What version of vite are you using?

0.1.36

System info and storybook versions

Environment Info:

System:
OS: Linux 5.4 Tencent tlinux 2.6
CPU: (16) x64 AMD EPYC 7K62 48-Core Processor
Binaries:
Node: 16.14.2 - ~/.nvm/versions/node/v16.14.2/bin/node
Yarn: 1.22.18 - ~/.nvm/versions/node/v16.14.2/bin/yarn
npm: 8.5.0 - ~/.nvm/versions/node/v16.14.2/bin/npm
npmPackages:
@storybook/addon-essentials: ^6.5.6 => 6.5.6
@storybook/addon-links: ^6.5.6 => 6.5.6
@storybook/addons: ^6.5.6 => 6.5.6
@storybook/builder-vite: ^0.1.36 => 0.1.36
@storybook/testing-library: ^0.0.11 => 0.0.11
@storybook/theming: ^6.5.6 => 6.5.6
@storybook/vue3: ^6.5.6 => 6.5.6

Describe the Bug

when I build, occurs an error:
image

I found the reason is the mock-core-js plugin impoted by @storybook/builder-vite,and it transforms the path which includes the 'core-js' and turns into empty string
image

why need this plugin? can it removed?

Link to Minimal Reproducible Example

No response

Participation

  • I am willing to submit a pull request for this issue.
@l1shu l1shu added the bug Something isn't working label Jun 16, 2022
@unicornware
Copy link

unicornware commented Jul 21, 2022

this issue may be of some help to you!

@IanVS
Copy link
Member

IanVS commented Jul 25, 2022

Thanks everyone. A fix for this has been released in @storybook/builder-vite 0.2.1. You can remove the workaround from your vite config once you upgrade. And please let us know if you hit any problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants