Skip to content

Darklua assumes path require's extension as explicit extension set path during convert_require #266

@jiwonz

Description

@jiwonz

Image
If you look at the picture, Darklua sees the path require with the extension set as the path with the extension set explicitly and does not set the .luau extension. Also the path require with the extension set explicitly is not supported in the latest Luau(ex. require("path/to/module.luau")). So Darklua must watch for it by inserting the .luau extension, but the problem is, since the extension is already set, Darklua searches for the file itself(ex. Darklua tries Error.global instead of Error.global.luau)

A workaround is to bundle it by replacing the extension with something else (e.g. underscore) instead of using dot inside of the path require.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions