wzrd.in icon indicating copy to clipboard operation
wzrd.in copied to clipboard

upgrade to npm@3

Open jfhbrook opened this issue 12 years ago • 6 comments

We should run npm dedupe for moar smallers bundles.

jfhbrook avatar Nov 05 '13 14:11 jfhbrook

Doesn't browserify implicitly dedupe based on package contents?

kirbysayshi avatar Apr 16 '14 16:04 kirbysayshi

At this point? Possibly. If someone could confirm that would be great. @thlorenz might know.

jfhbrook avatar Apr 16 '14 17:04 jfhbrook

Just fyi I'm going to be working on this – or something similar – this weekend. Right now it seems to be impossible to load Marionette.

The issue is that Backbone optionally supports jQuery, but doesn't explicitly require it. Marionette, on the other hand, has a hard dep on jQuery, but only references Backbone.$ when accessing it. Accordingly, to load Marionette, you must do:

var Backbone = require('backbone');
var $ = Backbone.$ = require('jquery');
var Marionette = require('backbone.marionette');

Right now, Marionette is pulling in its own Backbone and throwing an error. So I think deduping the dep tree will fix the problem.

jamesplease avatar Nov 27 '14 00:11 jamesplease

browserify dedupes based on file contents.

thlorenz avatar Nov 27 '14 02:11 thlorenz

It's entirely possible that wzrd.in is running with an old version of browserify. Check the package.json and ask max about it.

jfhbrook avatar Nov 27 '14 04:11 jfhbrook

I admit I'm not too familiar with Browserify's release history, but it seems like deduping was added in this PR, released as v5.12.1.

browserify-cdn relies on ^5.10.1, so if the above is correct, then fresh installs of browserify-cdn should pull in that release of browserify.

With that said, there have been 2 major releases of browserify since then. Nothing in the changelog mentions updates to deduping, but I have yet to check if simply updating the dep will fix this problem.

It's entirely possible that wzrd.in is running with an old version of browserify. Check the package.json and ask max about it.

Good suggestion, but I'm running my own instance of browserify-cdn and running into the same issue. My instance is using the latest 5.x release.

jamesplease avatar Dec 07 '14 02:12 jamesplease