-
Notifications
You must be signed in to change notification settings - Fork 20
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
Error bundling local packages with -r #30
Comments
Hi @derekr ! I consider this a bug since I see no reason why we shouldn't support the At first glance it seems that mothership module is getting passed a relative instead of absolute path. It might be a browserify issue since that path is coming from directly from browserify. In other cases this path is absolute but in this special case it is relative.
Since you found an easy work around and I don't think this is bugging anybody else I'd prefer not to spend time on it right now. We can come back to it later if necessary. Will leave open. Thanks! |
Cool thanks for the update! I did add a path.resolve downstream in mothership, but wasn't sure if that was the correct solution or right place. It did the trick, but I haven't done any further testing to see if it breaks other use cases. |
@dgbeck do I understand it correctly that the following use case is not supported: create separate bundles for the app and all vendor scripts, e.g. like this: vendor bundle
app bundle
where parcelify is used to bundle the vendor styles. Thanks for your help. |
HI @Stefan ! I'm not totally sure I understand the question, but I'm not seeing any red flags in those commands, other than potentially the same issue that is being described here. This issue as stated above looks like a browserify bug and may or may not have been fixed... I have not tried using the If you try it and it works, please followup and we can close this issue. Thanks! |
Hi @dgbeck, sorry maybe I have not been explicit enough. Of course I have tried running the command with and without parcelify as a plugin. Running the command without parcelify works as expected. However, running it with parcelify as described here results in the following error:
Contrary to what @derekr described, the required module is passed in as module name and not file. Cheers |
@stefan-- I got same error as yours, as long as there is Not sure if this var bResolve = require('browser-resolve');
b.pipeline.get('dedupe').push( through.obj( function( row, enc, next ) {
if (!fs.existsSync(row.file)) {
var resolved = false; // some kind of cache of resolved module path;
row.file = resolved ? resolved : bResolve.sync(row.file);
}
this.push(row);
next();
})); |
Only get the error when trying to bundle using the require
-r
option. If i create amain.js
that requires the component it bundles ok. Possible this use case isn't meant to be supported, but thought it'd be good to start a convo about it! :D./components/button/package.json
command
browserify \ -r ./components/button/index.jsx \ -g [ reactify --es6 ] \ -o public/js/bundle.js \ -p [ parcelify -l verbose -o public/css/bundle.css ]
err
The text was updated successfully, but these errors were encountered: