Closed clintwood closed 9 years ago
Can you share the exact configuration you're using? I get a different result with esperanto 0.6.33 (latest version - if I run esperanto -i lib/index.js -o dist/index.js -t cjs
, or anything similar, the ../
is preserved, so I'm not quite sure what's going on here
Ya, sorry should have mentioned, this only occurs if you specify the -b
flag for bundling (add -b
to what you have there)!
Hmmm... now that I think of it I'm not sure how much sense it makes to reference a json
file from inside a bundle (which would usually be shipped as a lib)!
Will close this now that Rollup is taking over from Esperanto. It'd definitely be possible to do this in Rollup via custom resolvers/loaders – only real question is to what extent things like this should work out of the box. Not sure what the answer is. Feel free to open a similar issue over on the Rollup issue tracker!
If there is a
./package.json
in./
and I bundle./lib/index.js
to CJS whereI get the following out
Notice that it has lost the
../
. is this expected? How to get the../
to stay?