Closed piranha closed 11 years ago
No, I believe this just breaks things. If you have a file in /src
called main.coffee
, its canonical name will be /main.coffee
. That will conflict with /main.coffee
derived from /src/main.coffee
. What actual issue has the current method of canonicalisation caused? Can you add a test that shows the issue?
To be honest, I can't figure out how to add a test - bundle
is replaced in test-setup.coffee
by custom function, which doesn't accept root
.
Can you please just try it yourself?
mkdir src
echo 'console.log 1' > src/main.coffee
node_modules/.bin/cjsify -r src main.coffee
And just look at the output. Second line from the end is the wrong one.
Just ran into this myself, and found this fix, thanks!
@michaelficarra Any plan to release a new minor version (v0.9.4)?
:+1:
Before that when I were doing
cjsify -r src main.coffee -o build/out.js
, everything would be normal except for the root require, which would look likerequire('/../main.coffee')
. This change fixes the problem.