Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
gillchristian opened this issue Nov 19, 2017 · 0 comments
Open

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

gillchristian opened this issue Nov 19, 2017 · 0 comments
Labels
Milestone

Comments

@gillchristian
Copy link
Member

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/.

@gillchristian gillchristian added this to the Beta release milestone Nov 19, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant