mirror of
https://github.com/luau-lang/rfcs.git
synced 2025-04-03 18:10:56 +01:00
Update docs/abstract-module-paths-and-init-dot-luau.md
Co-authored-by: Varun Saini <61795485+vrn-sn@users.noreply.github.com>
This commit is contained in:
parent
74cd1a76a7
commit
f3a0b7d519
1 changed files with 2 additions and 1 deletions
|
@ -85,7 +85,8 @@ path refers to a directory if it refers to a filesystem directory that lacks an
|
|||
|
||||
More concretely, Luau will no longer consider relative requires from a package
|
||||
`init.luau` file to resolve relative to the script itself. It will instead
|
||||
resolve relative to the script's parent, i.e. the folder containing the module.
|
||||
resolve relative to the location of the abstract module it represents, i.e. the
|
||||
location of its parent folder in a filesystem context.
|
||||
|
||||
Secondly, we recognize an unfortunate side effect of this change: code within
|
||||
`package/init.luau` is forced to write `require('./package/dependency')` when it
|
||||
|
|
Loading…
Add table
Reference in a new issue