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

React dependency renaming to CamelCase fail for my project #18

Open
tlenclos opened this issue Nov 10, 2015 · 1 comment
Open

React dependency renaming to CamelCase fail for my project #18

tlenclos opened this issue Nov 10, 2015 · 1 comment

Comments

@tlenclos
Copy link

Hi and thanks for your amazing work on rackt libraries !
I was wondering why you rename the dependency here on your webpack config https://github.com/mzabriskie/rackt-cli/blob/master/webpack.build.js#L27

externals: {
  'react': 'React',
  'react/addons': 'React',
  'react-dom': 'ReactDOM'
}

in my project we require react with the standard name react so for example this other lib of ract fail to find React at runtime... https://github.com/rackt/react-autocomplete/blob/master/dist/react-autocomplete.js#L5.

I'm forced to create a proxy module which is ugly:
define('React', ['react'], react => react)

Thanks,
Thibault.

@thibaudcolas
Copy link

I'm having the exact same issue. Because of it:

  • React is loaded twice into my bundle
  • On some systems (CI env that I don't control, case-sensitive file system maybe?), the build fails with a Cannot find module 'React' from [...] error.

I'm using Browserify to bundle my project, which may not process package names as Webpack does.

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

No branches or pull requests

2 participants