You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
opts.fullPaths disables converting module ids into numerical indexes. This is useful for preserving the original paths that a bundle was generated with.
afaict it always does this anyway - is this a bug?
I really want to remove the system paths. Explicitly setting this to false doesn't help. Is there any way?
// fullPaths=false// [...]},{}],33:[function(require,module,exports){// [...]// and then at the end of the file, the index to// to find the full path back{"./lib/_stream_duplex.js":33,"./lib/_stream_passthrough.js":58,"./lib/_stream_readable.js":59,"./lib/_stream_transform.js":60,"./lib/_stream_writable.js":61,"/mysystem/myproject/node_modules/browserify/node_modules/readable-stream/readable.js":18,"stream":21}]// [...]
I think your problem is rather similar to this issue #675
@callumlocke What exactly are you trying to accomplish: keep absolute paths out of the bundle? Keep any path data (even relative) out? Please create a repo with a simple reproduction and explanation of how the actual output differs from your desired output.
The issue is the statement I quoted from the readme seems to be wrong: it suggests that paths are usually converted into numerical indexes (unless you explicitly enable opts.fullPaths). But in my experience this isn't true, you always get string paths.
@callumlocke Ok, thanks for elaborating, I see what you mean. It must have worked that way at one point, but like you said it's obviously inaccurate now. My understanding is that, pretty much what @maxlath said, fullPaths currently toggles absolute local paths instead of relative paths (to the require()'ing file or base dir).
In any case, as @py-in-the-sky said I think the solution to your problem is bundle-collapser. Can you please take a look and post back here whether that does the trick for you?
I'm putting a documentation label on this issue to get that description straightened out.
Activity
maxlath commentedon Nov 4, 2014
opts.fullPathsonly toggles the alternative between having:or
I think your problem is rather similar to this issue #675
py-in-the-sky commentedon May 29, 2015
You can now use https://www.npmjs.com/package/bundle-collapser
jmm commentedon May 29, 2015
@callumlocke What exactly are you trying to accomplish: keep absolute paths out of the bundle? Keep any path data (even relative) out? Please create a repo with a simple reproduction and explanation of how the actual output differs from your desired output.
callumlocke commentedon Jul 2, 2015
@jmm I don't want any paths in the bundle.
The issue is the statement I quoted from the readme seems to be wrong: it suggests that paths are usually converted into numerical indexes (unless you explicitly enable opts.fullPaths). But in my experience this isn't true, you always get string paths.
jmm commentedon Jul 2, 2015
@callumlocke Ok, thanks for elaborating, I see what you mean. It must have worked that way at one point, but like you said it's obviously inaccurate now. My understanding is that, pretty much what @maxlath said,
fullPathscurrently toggles absolute local paths instead of relative paths (to therequire()'ing file or base dir).In any case, as @py-in-the-sky said I think the solution to your problem is
bundle-collapser. Can you please take a look and post back here whether that does the trick for you?I'm putting a
documentationlabel on this issue to get that description straightened out.Thanks!
Clarify fullPaths option, fixes #902.