C
C
candybooberr2016-07-20 01:13:37
JavaScript
candybooberr, 2016-07-20 01:13:37

How not to download the same module twice with browserify?

Hello. I use ReactJS, Gulp, requirejs, bower in my project.
I want to install the react-telephone-number-input plugin, which in turn collects dependencies in the CommonJS syntax.
Build the plugin with browserify. The result is a 800Kb file, which in turn contains another copy of React.
Tell me how to avoid this?
Is there a normal way to connect modules asynchronously and not load second React synchronously?
Thank you in advance for your attention.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Korolev, 2016-07-28
@Apathetic

Forget about bower, install dependencies from npm. Build with webpack, browserify is hopelessly outdated.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question