builder-vite icon indicating copy to clipboard operation
builder-vite copied to clipboard

[Bug] Error loading modules after v0.2.2

Open RodrigoHamuy opened this issue 2 years ago • 1 comments

What version of vite are you using?

3.1.0

System info and storybook versions

System: OS: Linux 5.15 Ubuntu 22.04.1 LTS 22.04.1 LTS (Jammy Jellyfish) CPU: (8) x64 11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz Binaries: Node: 16.15.0 - ~/.nvm/versions/node/v16.15.0/bin/node Yarn: 1.22.19 - ~/.nvm/versions/node/v16.15.0/bin/yarn npm: 8.5.5 - ~/.nvm/versions/node/v16.15.0/bin/npm Browsers: Chrome: 106.0.5249.103 npmPackages: @storybook/addon-actions: ^6.5.12 => 6.5.12 @storybook/builder-vite: 0.2.2 => 0.2.2 @storybook/react: ^6.5.12 => 6.5.12 @storybook/testing-library: ^0.0.13 => 0.0.13

Describe the Bug

@react-three/drei <Text component no longer works on production build (it does work on development mode). This is the error message:

Uncaught ReferenceError: __name is not defined
    at workerBootstrap...

My guess is that it can't resolve troika-three-text.

Everything works as expected on version v0.2.2, but newer versions result in the above error.

Here are the differences between v0.2.2 and v0.2.4 for convinience.

Link to Minimal Reproducible Example

https://rodrigohamuy.github.io/drei-text-demo/

Participation

  • [ ] I am willing to submit a pull request for this issue.

RodrigoHamuy avatar Oct 14 '22 12:10 RodrigoHamuy

+1

idosius avatar Oct 26 '22 15:10 idosius