ClosestStorm / v8cgi

Automatically exported from code.google.com/p/v8cgi
BSD 3-Clause "New" or "Revised" License
0 stars 1 forks source link

require()/include() load wrong file #41

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
With two files ./module.bla and ./module.bla.js call of
require('./module.bla') try execute ./module.bla like JS (instead of
./module.bla.js).

Original issue reported on code.google.com by mr.ve...@gmail.com on 15 Nov 2009 at 11:32

GoogleCodeExporter commented 9 years ago
when no file ./module.bla -- require('./module.bla') execute ./module.bla.js

Original comment by mr.ve...@gmail.com on 15 Nov 2009 at 11:34

GoogleCodeExporter commented 9 years ago
Let me reformulate this issue: when resolving module name, the ".js" suffix 
should
have higher priority than no suffic.

So, require("./something") should try (in this order):
1) ./something.js
2) ./something.so (.dll on windows)
3) ./something

correct?

Original comment by ondrej.zara on 16 Nov 2009 at 6:53

GoogleCodeExporter commented 9 years ago
Fixed in r669.

Original comment by ondrej.zara on 16 Nov 2009 at 7:45