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

Add storeConfigInMeta option. #2298

Merged
merged 1 commit into from
Oct 12, 2014

Conversation

rwjblue
Copy link
Member

@rwjblue rwjblue commented Oct 12, 2014

Allows opting out of using <meta> tag in head section for configuration.

  • If set to true the calculated config will be stored in a <meta> tag in index.html.
  • If set to false the calculated config will be stored in the final my-app-name.js file.

Defaults to true.

Closes #2184.

Allows opting out of using `<meta>` tag in `head` section for
configuration.

* If set to `true` the calculated config will be stored in a `<meta>`
  tag in `index.html`.
* If set to `false` the calculated config will be stored in
  the final `my-app-name.js` file.

Defaults to `true`.
rwjblue added a commit that referenced this pull request Oct 12, 2014
@rwjblue rwjblue merged commit f3d14e5 into ember-cli:master Oct 12, 2014
@rwjblue rwjblue deleted the add-opt-out-for-meta-config branch October 12, 2014 19:11
@sandstrom
Copy link
Contributor

Awesome!

@selvagsz
Copy link

This is indeed what we need. We don't use the generated index.html. Thanks @rwjblue

@stavarotti
Copy link
Contributor

@rwjblue Good work. Should this be documented on the ember-cli site? There are and continue to be a lot of flexible options added that are only visible if looking at ember-app.js file, which is fine for folks who follow the repo but not so much new comers.

I volunteer to update the docs and only need to know what should and shouldn't be updated based on ratified solutions.

Thanks again.

@oskarrough
Copy link

How about setting the default to false? Perhaps you can enlighten me but I don't see why you'd want it in index.html instead of the final .js file.

@stefanpenner
Copy link
Contributor

Equality between builds where only the config changes. Allows staging and production builds to be easily compared.

This also enables sharing the same cdn, and just relying on fingerprinting to differentiate, until a staging build is promoted to prod.

@jmurphyau
Copy link
Contributor

Also I found that in development when running ember server, navigating to /tests and having acceptance tests that navigate to other URLs, if storeConfigInMeta is false the test actually initiates a transition to that URL and you end up exiting from the test page

@stefanpenner
Copy link
Contributor

Yes. We plan to address that with the packager work

@dejongnj
Copy link

dejongnj commented Mar 5, 2018

Awesome! I know I'm late to the party, but this PR keeps giving :)

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

Successfully merging this pull request may close these issues.

Option to include config in app build instead of meta-tag in index.html
9 participants