Open schungx opened 2 years ago
Currently import remapping is not exposed in the HIR, but it is planned.
Maybe we could let the user do it via rhai scripts themselves from the config, what do you think?
Maybe we could let the user do it via rhai scripts themselves from the config, what do you think?
Sort of like a build script? Possible, but I think a bit cumbersome for users. And, in order to provide the flexibility, we'd need to define a complete config API in Rhai.
So maybe something simple that takes the cue from Node and WebPack config options... that might already be enough.
Some users may organize their module scripts directly under the source directory, but resolve them into different paths at runtime.
For example, if we have:
During runtime, the user may want imports to work this way:
So can something like this be put into
Rhai.toml
: