Tim Caswell
Tim Caswell
Thanks @squeek502
So basically, there is no sane way to have relative requires in lua. I guess we could just write a library that doesn't touch require at all (it can `import(name)`...
@squeek502 I don't think any of the default loaders support absolute paths. But I guess I could add a simple loader that does.
@squeek502 The suggestion by @SoniEx2 is a replacement for the debug.\* hack and greatly simplifies the custom loader (in fact we will only need one for bundle paths) I'm prototyping...
So this works for basic relative requires without any loader at all for files on disk: ``` . ├── libs │ ├── bar │ │ ├── init.lua │ │ └──...
This above solution is very simple and works for some of the use cases. But there are still some problems. - It requires that `main.lua` be at the root of...
Also we can't do more advanced searches like find `../../deps/foo` as just `"foo"`. This requires some sort of resolve helper like @squeek502 suggested since we can't do it in the...
@squeek502 how about this: - Add a simple require loader to luvi itself that loads bundle paths. - Write a library that performs luvit style resolve using either `...` at...
That would handled by the resolve library, not in core or a loader.