Skip to content
This repository has been archived by the owner on Jun 19, 2018. It is now read-only.

Browserify with Gulp and the resolve plugin #371

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

Browserify with Gulp and the resolve plugin #371

okayawright opened this issue Jun 20, 2016 · 3 comments

Comments

@okayawright
Copy link

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
Copy link
Owner

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

@okayawright
Copy link
Author

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
Copy link
Owner

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.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants