Skip to content

Ags resolves relative imports based on the reolved symlink path to app.ts #681

@upidapi

Description

@upidapi

Currently the relative imports are based on the resolved path of the app.ts file. So if i run "ags run /tmp/sym-ags" if /tmp/sym-ags/app.ts is a symlink to tmp/ags/app.ts. Then the relative imports will be based on "tmp/ags" insted of "tmp/sym-ags"

Code to replicate the issue.

ags init -d /tmp/ags
mkdir /tmp/sym-ags -p
ln -s /tmp/ags/app.ts /tmp/sym-ags/app.ts
ags run -d /tmp/sym-ags

If the relative import path where to be based on the dir run then it would insted have shown an error since it tries to import files that arent in the /tmp/ags-sym" folder

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions