-
Notifications
You must be signed in to change notification settings - Fork 19
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
Using parcelify with Grunt #39
Comments
Hi @pra85 ! Unfortunately I can't offer very much help here as I don't think this is a parcelify issue and I have too much going on to try to reproduce, etc. Couple things came to mind..
https://github.com/jmreidy/grunt-browserify#configure
I hope that helps at least a little ! David |
Hi @pra85 , I have researched on this issue, it seems the grunt-browserify is causing Of course, this mean that if you have other package that depends on |
From what I can tell this issue is related to the one I'm facing with Both How can we make this work? Is there a specific reason that parcelify is relying on Edi |
Hi @mediafreakch ! Great to know that the issues are related.
I'm not sure any other way to determine which rows in the browserify pipeline correspond to entry points, and parcelify needs that information to do its thing. If there is another way, I'm open to switching. But it seems clear that the |
@dgbeck I have been trying to understand the parcelify process, without much luck. I'm stuck at what the role of an entry file is in parcelify... Can you help? Why is |
Hi @mediafreakch, Parcelify needs to know which row is the entry point so that it can figure out where the "top" of the js dependency graph is, so that it can build the css bundle by concatenating css files in the correct order. Thinking this through further, in most cases it would be possible to look at the structure of the dependency tree after it has been built, and figure out where the "top" is by finding the node on which nothing depends, but that approach will not work if something depends on the entry point. (Also there is a case of multiple entry points to consider, although in that case I think we could use the keys in Again, this issue has highlighted a clear, reproducible bug in browserify. Rather than jumping through hoops to try to work around it in parcelify, the cleaner approach is to fix the issue upstream at its root. Have you submitted a issue on the browserify repo? |
@dgbeck I see. The thing with the order makes sense. I haven't submitted an issue because I don't see the reproducible bug you mention. As I understand this is by design to allow bundles that have no entry-point (and require them in other bundles). |
Ah, ok, I see. I'm having a hard time figuring out where the root of the problem in light of that information. To me it seems like if there is no entry point, it makes no sense for parcelify to bundle anything. I'm confused as to why karma-browserify and grunt-browserify are neglecting to "specify" an entry point, when it seems clear that conceptually there is a entry point in these cases. I'm inclined to think that the root of the problem therefore is in the way these repos are interfacing with browserify. However, if this issue is blocking you, I realize that doesn't help much, since I have a feeling those repos are not going to change the way they are doing things. A work around that comes to mind, would be to "tell" parcelify what the entry point is using the
kind of a dirty work around, but whatever. I'm open to a PR for that. |
I'm waiting for nikku/karma-browserify#182 to be reviewed. If that gets approved, the only thing left would be for karma-browserify to wait for parcelify to do its job before launching the tests. |
I am using grunt-browserify and trying integrate parcelify with it.
I used the the preBundleCB task option provided by grunt-browserify and created a grunt configuration like
This task doesn't fail but the parcelify plugin doesn't generate the CSS file.
But when running it from command line , it works without issue , I used the following command
After investigating , I found that the callback passed as parameter to
_this.instantiateParcelAndPackagesFromMap
( https://github.com/rotundasoftware/parcelify/blob/v2.1.0/index.js#L122 ) function never gets executed.I have working version of my code at https://github.com/pra85/grunt-browserify-example
Any help or advice for this issue would be really appreciated , Thanks
The text was updated successfully, but these errors were encountered: