mirror of
https://github.com/luau-lang/rfcs.git
synced 2025-05-04 10:43:48 +01:00
Clarify that (3a) supports implicit relative paths
This commit is contained in:
parent
12614181d0
commit
641d97e6a0
1 changed files with 12 additions and 0 deletions
|
@ -137,6 +137,18 @@ require("./libs/dependency")
|
||||||
require("@libs/dependency")
|
require("@libs/dependency")
|
||||||
```
|
```
|
||||||
|
|
||||||
|
If the `libs` alias did not exist, however, we would have the following:
|
||||||
|
```luau
|
||||||
|
-- Requires ./libs/dependency.luau
|
||||||
|
require("libs/dependency")
|
||||||
|
|
||||||
|
-- Requires ./libs/dependency.luau
|
||||||
|
require("./libs/dependency")
|
||||||
|
|
||||||
|
-- Error: there is no "@libs" alias in .luaurc
|
||||||
|
require("@libs/dependency")
|
||||||
|
```
|
||||||
|
|
||||||
#### (3b) Aliases as fallbacks
|
#### (3b) Aliases as fallbacks
|
||||||
|
|
||||||
If aliases were fallbacks, we would have the following behavior.
|
If aliases were fallbacks, we would have the following behavior.
|
||||||
|
|
Loading…
Add table
Reference in a new issue