rackt-cli
rackt-cli copied to clipboard
React dependency renaming to CamelCase fail for my project
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.
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.