Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pulp server does not bundle JS deps with browserify #316

Open
btrepp opened this issue Dec 21, 2017 · 2 comments
Open

Pulp server does not bundle JS deps with browserify #316

btrepp opened this issue Dec 21, 2017 · 2 comments
Labels

Comments

@btrepp
Copy link

btrepp commented Dec 21, 2017

pulp server runs browserify and succeeds.
I would expect to see something like pulp browserify > app.js served at /app.js.
Instead I see something that looks like something thats bundled, but not browserified.

This file at app.js, if using require, throws javascript errors in a browsers console.

Is there another url for the browserified bundle?.

I could very well be using pulp server wrong, (eg maybe I need some sort of extra pulp/requirejs loaded in the browser?). but an example of an index.html file it works with would be greatly appreciated :).

@hdgarrood
Copy link
Collaborator

This is an oversight on my part: pulp server currently doesn't do any browserifying, i.e. it doesn't support code that uses require(). (It used to, until about an architecture change I made about a year ago.) This should be relatively easy to fix, though.

As a workaround you might be able to do something like pulp --watch browserify --to app.js and then run something like serve in another terminal.

@btrepp
Copy link
Author

btrepp commented Dec 21, 2017

Ah no worries!. It still attempts to do some browserifying (eg it echoes to console and fails if deps aren't present). So I thought it was my user error :).

Thanks!

@hdgarrood hdgarrood added the bug label Dec 22, 2017
@hdgarrood hdgarrood changed the title Pulp server not serving browserified bundle at /app.js Pulp server does not bundle JS deps with browserify Jun 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants