Skip to content

inconsistent path resolution in imports and sdk commands #77

@x87

Description

@x87

complex scripts could be organized in folders and subfolders. For example

- \CLEO
-- \MegaMod
--- \extra
---- addon.js
---- model.mjs
---- lib.dll
--- index.js

import statements allows usage of ./ as the current file's directory. It resolves to CLEO/MegaMod/extra/ in addon.js and to CLEO/MegaMod/ in index.js.

SDK commands allows ./ too. But it always resolves to the index.js directory, regardless of the file location.

addon.js

import './model.mjs'; // works

DynamicLibrary.Load('./lib.dll'); // does not work, `CLEO/MegaMod/lib.dll` does not exist

DynamicLibrary.Load('./extra/lib.dll'); // works

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