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:
Andy Friesen 2025-04-01 09:56:14 -07:00 committed by GitHub
parent 74cd1a76a7
commit f3a0b7d519
Signed by: DevComp
GPG key ID: B5690EEEBB952194

View file

@ -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