-
-
Notifications
You must be signed in to change notification settings - Fork 407
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
Addon runtime and buildtime config #636
Comments
I think the v2 addon format should be taken into consideration. I hope the build-time macros will replace some of the run-time configuration. But I agree that there is still a need to standardize the rest. I noticed how hart it is to get it right with the current primitives while refactoring the configuration interface of ember-cli-content-security-policy. Needed a few iterations until I landed on a solution that solved all problems. One problem I haven't thought of before: the configuration stored in Having three different locations for addon configuration doesn't feel like convention over configuration. And not having a naming convention for the keys used ( Not sure if the package name is a good convention. I know that's what most addons are currently doing. But:
|
I'm reading the v2 addon format RFC and this would be covered under there. Although I originally was thinking that the best way is to have a static key, the macro system proposed in v2 format describes a different configure system that would achieve the same goal of making it easier to pass around config. https://github.com/emberjs/rfcs/blob/master/text/0507-embroider-v2-package-format.md#build-hooks Going to close this in favor of (already merged) #507. |
Apps should automatically get a namespaced way to pass runtime and buildtime config that an addon can then access easily. Currently
config/environment.js
(haven't tried this, not sure how it becomes accessible to the app).Proposal is to make the name of the package the key in both ember-cli-build.js and in config/environment.js.
The text was updated successfully, but these errors were encountered: