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

Only Runs On Addon Directory #29

Open
chadhietala opened this issue Nov 26, 2018 · 5 comments
Open

Only Runs On Addon Directory #29

chadhietala opened this issue Nov 26, 2018 · 5 comments

Comments

@chadhietala
Copy link
Member

This seems to only run on the addon directory when used in an addon. When I moved the code that was using ember-compatibilty-helpers to the addon directory the inlining of the boolean worked. Prior to that I would get a runtime exception about ember-compatibilty-helpers missing.

@pzuraq
Copy link
Collaborator

pzuraq commented Nov 26, 2018

That makes some sense, this addon is a plugin that adds itself to its parent's babel configuration, so maybe it's only running against the /addon dir because that's all that ember-cli-babel does when included in an Ember addon? e.g., app gets merged directly into the root app without any transforms being run on it

@rwjblue
Copy link
Member

rwjblue commented Nov 26, 2018

This seems to only run on the addon directory when used in an addon. When I moved the code that was using ember-compatibilty-helpers to the addon directory the inlining of the boolean worked.

Yep, sounds like things are functioning as intended. This is exactly the reason that we advise folks that all addon code should be in the addon/ directory, and the app/ directory should only contain re-exports.

@ppcano
Copy link

ppcano commented Feb 7, 2019

I experienced the opposite behavior (not running in the addon directory) and reported the issue at #32.

@rileyhilliard
Copy link

This seems to only run on the addon directory when used in an addon. When I moved the code that was using ember-compatibilty-helpers to the addon directory the inlining of the boolean worked.

Yep, sounds like things are functioning as intended. This is exactly the reason that we advise folks that all addon code should be in the addon/ directory, and the app/ directory should only contain re-exports.

What about the fastboot/ directory? I think I am hitting this issue for code in fastboot/:

Could not find module `ember-compatibility-helpers` imported from `<PATH TO FILE THAT IMPORTS ember-compatibility-helpers>`

@rwjblue
Copy link
Member

rwjblue commented Jul 15, 2020

fastboot is roughly the same treatment as app I think (though we'd have to double check with the implementation in ember-cli-fastboot).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants