You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not sure exactly what's going on here, but I've managed to boil it down to a minimal reproduction repo.
If an addon calls this.project.config('development') in it's setupPreprocessorRegistry() hook, it appears to break at least some (maybe all) addon-supplied config.
Reproduction steps
Clone down the repo
Run ember server
Inspect the contents of the config meta tag. Note the presence of the _APPLICATION_TEMPLATE_WRAPPER key in the encoded config object. This is the expected, correct behavior.
Open lib/bug-exposer/index.js
Add an environment parameter to the this.project.config invocation (i.e. this.project.config('development').
Restart the server
Inspect the contents of the config meta tag. Note the absence of the _APPLICATION_TEMPLATE_WRAPPER key in the encoded config object.
It appears that the act of calling this.project.config()with an environment parameter has caused the @ember/optional-features addon config to break.
Errata
I haven't figured out exactly what's going on here, but I figured I'd brain dump the boundaries of what I have discovered so far.
I'm not sure if some or all addon-supplied config breaks. The test repo demonstrates the issue with @ember/optional-features. It's also impacting a private addon we are using in combination with ember-template-component-import which calls project.config in the setupPreprocessorRegistry hook.
It can break from a deeply nested addon. I.e. an app will break if it depends on addon A, which depends on addon B, which makes the offending call.
The text was updated successfully, but these errors were encountered:
davewasmer
added a commit
to knownasilya/ember-template-imports
that referenced
this issue
Feb 22, 2019
After starting the server, if you save the consuming application's config/environment.js file causing a rebuild, the config loads correctly (both for that rebuild, as well as all subsequent rebuilds). However, rebuilds triggered by changing other files doesn't appear to correct the problem.
I'm not sure exactly what's going on here, but I've managed to boil it down to a minimal reproduction repo.
If an addon calls
this.project.config('development')
in it'ssetupPreprocessorRegistry()
hook, it appears to break at least some (maybe all) addon-supplied config.Reproduction steps
ember server
_APPLICATION_TEMPLATE_WRAPPER
key in the encoded config object. This is the expected, correct behavior.lib/bug-exposer/index.js
this.project.config
invocation (i.e.this.project.config('development')
._APPLICATION_TEMPLATE_WRAPPER
key in the encoded config object.It appears that the act of calling
this.project.config()
with an environment parameter has caused the@ember/optional-features
addon config to break.Errata
I haven't figured out exactly what's going on here, but I figured I'd brain dump the boundaries of what I have discovered so far.
I'm not sure if some or all addon-supplied config breaks. The test repo demonstrates the issue with
@ember/optional-features
. It's also impacting a private addon we are using in combination with ember-template-component-import which callsproject.config
in thesetupPreprocessorRegistry
hook.It can break from a deeply nested addon. I.e. an app will break if it depends on addon A, which depends on addon B, which makes the offending call.
The text was updated successfully, but these errors were encountered: