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
we have dropped support for anyone using storeConfigInMeta: false
the config module that the app uses isn't where we have stored any of your config, we still have a node-land config outside of the app folder that represents the "old way" to do things
Ideally we would have only one concept for the config module, a simple ES module in your app that exports an object. But there are some challenges:
If we move the config into the ES module then the default behaviour of storeConfigInMeta: true will no longer work because we generate the config for the index.html in the content-for code in stage 1 (or 2 🤷)
we need to make sure that we can still provide a good API for people setting different config in different environments. We could do this with macros but that could prove difficult if we're overlaying babel based macros into a system that need to be automatically read to generate the index.html config meta
Possible solutions
This is not an exhaustive list so if anyone reading this comes up with other possible solutions please feel free to add them
if there is a timing issue with stage 1/2 having to read things from the config we could just divorce the implementation of StoreConfigInMeta from the Ember pre-build
it is possible that we could implement the whole concept as a vite/rollup plugin that other people could use outside of the ember ecosystem. With that in mind it's worth checking if there are already pre-existing solutions to what we're trying to do here
Example
here is a possible way to use macros to define the module:
import{macroCondition,isTesting}from'@embroider/macros';constENV={modulePrefix: 'app-template',
environment,rootURL: '/',locationType: 'history',EmberENV: {EXTEND_PROTOTYPES: false,FEATURES: {// Here you can enable experimental features on an ember canary build// e.g. EMBER_NATIVE_DECORATOR_SUPPORT: true},},APP: {// Here you can pass flags/options to your application instance// when it is created},};if(macroCondition(isTesting())){// Testem prefers this...ENV.locationType='none';// keep test console output quieterENV.APP.LOG_ACTIVE_GENERATION=false;ENV.APP.LOG_VIEW_LOOKUPS=false;ENV.APP.rootElement='#ember-testing';ENV.APP.autoboot=false;}exportdefaultENV;
The text was updated successfully, but these errors were encountered:
There are 2 problems in the system right now:
storeConfigInMeta: false
Ideally we would have only one concept for the config module, a simple ES module in your app that exports an object. But there are some challenges:
storeConfigInMeta: true
will no longer work because we generate the config for the index.html in thecontent-for
code in stage 1 (or 2 🤷)Possible solutions
This is not an exhaustive list so if anyone reading this comes up with other possible solutions please feel free to add them
Example
here is a possible way to use macros to define the module:
The text was updated successfully, but these errors were encountered: