Skip to content

Aliases are relative to the project's root directory #54

@gillchristian

Description

@gillchristian

Consider the following files

/my-module
|__ README.md
|__ docs/
|   |__ doc.md
|__ src/
    |__ index.js

This chimi.config.js

module.exports = {
  aliases: {
    'my-module': `./src/`
  }
}

And this snippet in both README.md docs/doc.md:

const myModule = require('my-module')

myModule.foo().bar()

When chimi aliases my-module to ./src and runs the snippets, the one in the README will run ok but the one in docs/doc.md will error because it cannot find .src/.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions