Hacker News new | ask | show | jobs
by andrewmcwatters 3287 days ago
Your use of `require` is incorrect.
1 comments

Can you elaborate on this?
All resource paths (.lua files are resources like any other) in Crown are unix-style and do not include the extension.

I have a custom loader that deals with it: https://github.com/dbartolini/crown/blob/master/src/lua/lua_...

I would recommend that you extend `package.loaders` instead. You risk breaking expected `require` functionality. Then you get the benefits of both!!

https://www.lua.org/manual/5.1/manual.html#pdf-package.loade...