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

Snowpack create common files that are discarded by resolveWebModule #94

Closed
nestarz opened this issue May 8, 2020 · 2 comments
Closed

Comments

@nestarz
Copy link

nestarz commented May 8, 2020

Describe the bug

Snowpack create common files in web_modules that are discarded by resolveWebModule (1), thus leading to error like this one
[vite] Error while resolving node_modules with id "common/react-8a00ae8c.js":

(1): in node_modules/vite/dist/server/serverPluginModuleRewrite.js:61

console.log(webModulePath, id, webModulesMap);
/projects/map/web_modules/common/react-8a00ae8c.js.js common/react-8a00ae8c.js Map(3) {
  'react' => '/projects/map/web_modules/react.js',
  'react-dom' => '/projects/map/web_modules/react-dom.js',
  'react-simple-maps' => '/projects/map/web_modules/react-simple-maps.js'
}

Current and silly workaround is to manually remove the common file and copy paste its content in the library files that need it.

System Info

  • required vite version:"^0.12.0"
  • required Operating System: OSX
  • required Node version: 12
@nestarz nestarz added the bug label May 8, 2020
@nestarz
Copy link
Author

nestarz commented May 8, 2020

Should I add a reproducible sandbox of this bug ?

@yyx990803
Copy link
Member

It's already fixed, see the commit (not released yet)

@github-actions github-actions bot locked and limited conversation to collaborators Jul 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants