Skip to content
This repository has been archived by the owner. It is now read-only.

Browserify with Gulp and the resolve plugin #371

Closed
okayawright opened this Issue Jun 20, 2016 · 3 comments

Comments

Projects
None yet
2 participants
@okayawright
Copy link

okayawright commented Jun 20, 2016

I use Browserify with Gulp and the resolve plugin to concatenate all NPMs into one single JS file.
I need to add the attribute:
"main": "dist/js/angular-bootstrap-calendar-tpls.js"
in 'package.json' for resolve to pick up an entry point in that module.
Can you please add this to your setup?

Thank you.

@mattlewis92

This comment has been minimized.

Copy link
Owner

mattlewis92 commented Jun 21, 2016

That's odd, browserify should already pick up the browser field that's set, changing it to main shouldn't break anything though.

@okayawright

This comment has been minimized.

Copy link
Author

okayawright commented Jun 21, 2016

It's this module : https://github.com/substack/node-resolve which is apparently not compliant with the 'browser' field.
Browserify works fine with 'browser' but my set up is a bit uncommon: in my gulp tasks, I first need to resolve which files are later needed by browserify, and then concatenate them into a single file. For this purpose I use this 'resolve' plugin. And this plugin was apparently not designed with browserify in mind.

@mattlewis92

This comment has been minimized.

Copy link
Owner

mattlewis92 commented Jun 21, 2016

Ah I've come across issues with that module before, I'll fix this when I have some free time, in the meantime you should be able to require('angular-bootstrap-calendar/dist/js/angular-bootstrap-calendar-tpls') to work around this for now.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.