3 ms·
That is the point. You don't need to be making two versions. This has nothing to do with npm even. Just write your code using the commonjs require syntax. When
by shtylman 14y ago
That is the point. You don't need to be making two versions. This has nothing to do with npm even. Just write your code using the commonjs require syntax. When you want client side scripts use one of the many different bundlers which can resolve the requires and turn it into whatever loader style you want (flat time, AMD, custom, etc). This provides much more flexibility and keeps the code free of boilerplate which serves no purpose.