Las nuevas instalaciones usarán por defecto compilaciones de Ember CLI en Producción

As of today, all new self hosted installs of Discourse will default to using our Ember CLI builds in production.

We’ve been running these builds ourselves in production for quite some time now and they should be stable and work with all major plugins. If you encounter any issues and need to turn it off, edit your app.yml and remove EMBER_CLI_PROD_ASSETS: 1

Otherwise, please report any bugs to us and we’ll be quick to fix them.

In the near future all installs of Discourse will be using the Ember CLI builds.

18 Me gusta

Current self hosted sites, does it require an rebuild or admin upgrade to switch over ?

3 Me gusta

My interpretation is that for existing installs, you can switch to using Ember CLI by doing one of two things:

  1. Edit app.yml to add the EMBER_CLI_PROD_ASSETS: 1 line, then rebuild, or
  2. Wait until “the near future” when it becomes the standard, then rebuild
5 Me gusta

Yes @Simon_Manning is correct - you can enable it yourself manually if you wish, or you can wait for it to become the default. We are rolling it out slowly to try and catch all the bugs in advance.

7 Me gusta

ok, i have it installed. anything i need to keep an eye on ?

1 me gusta
Browserslist: caniuse-lite is outdated. Please run:
npx browserslist@latest --update-db

Why you should do it regularly:
https://github.com/browserslist/browserslist#browsers-data-updating
1 me gusta

Just let us know if anything is broken, please.

4 Me gusta

Could you also explain what it entails and why it matters — to those not familiar with the Ember ecosystem.

9 Me gusta

Hi, any ETA? Thank you.

1 me gusta

you can already implement it.

All you need to do it add a line to your app.yml and rebuild.

2 Me gusta

We plan to enable it for older sites in around a month from now.

8 Me gusta

I’m super excited about this change and it’s a great thing for the future of Discourse.

I would simply recommend this: if you are running any third party theme components or plugins, please spin up a separate test instance with the same set and check it all out there before moving to ember cli on your main site.

I have just released some significant changes to one of my Theme Components without which it would have broken the host site.

14 Me gusta

There’s more information here:

The short version is: this is the officially supported way to develop Ember applications and should make it easier for people to contribute and for us to ugprade Ember in the future.

9 Me gusta

Yes, I set up EMBER_CLI_PROD_ASSETS: 1 but Dracula Theme is not working well.
so I remove this feature :frowning:

3 Me gusta

You should post on Dracula a Dark Theme for Discourse so that they can fix it.

5 Me gusta

¿Es cierto que los únicos componentes de tema que probablemente se verán afectados por este cambio son aquellos que Wyeth utiliza JavaScript?

¿Hay alguna forma fácil de hacer una consulta para encontrar los componentes de tema que incluyen JavaScript? ¿Algún explorador de datos o consulta de Rails? Me gustaría tener una forma de saber qué sitios se verán afectados por esto y ofrecerles usar mi nuevo producto (gratis, para poder conseguir finalmente algunos probadores) para instalar un sitio de staging y hacer una prueba antes de que actualicen su sitio de producción.

1 me gusta

Eso es cierto: este cambio en el Ember CLI no afecta las partes de HTML o CSS de los temas/componentes.

En general, puedes identificar los componentes temáticos problemáticos buscando avisos de deprecación amarillos en la consola de JavaScript del navegador en el entorno anterior que no usaba Ember CLI. (La migración a Ember CLI es la razón por la que hemos estado introduciendo estas deprecaciones).

Meta ha estado ejecutando Ember CLI durante varias semanas y hemos estado trabajando para asegurarnos de que todos nuestros temas/plugins oficiales funcionen en el nuevo entorno.

6 Me gusta

Ok. Entonces, si descargo /admin/customize/themes.json (o la ruta real que sea) contendrá advertencias. ¿Creemos que es probable que tenga falsos negativos (es decir, sin advertencias pero fallará al actualizar)?

Ah, y si falla, solo tienes que volver a desactivar la variable de entorno.

Para los plugins, si veo advertencias de depreciación en la consola de javascript, ¿entonces finalmente tendré que averiguar qué significan? Parecía que provenían de componentes que estaba usando y no de mi código, pero Ember y javascript todavía son bastante misteriosos para mí. (a pesar de tener una gran cantidad de código que al menos escribí en su mayor parte).

2 Me gusta

No, las advertencias de depreciación aparecen en tiempo de ejecución en la consola de tu navegador. No aparecerán en la API REST de temas.

Por ahora, podrías hacer esto. Pero tenemos la intención de que sea el predeterminado no opcional muy pronto, por lo que la mejor solución es solucionar la causa raíz.

Sí, me temo que sí. Si crees que provienen de componentes principales, o si tienes dificultades para encontrar la razón, por favor abre un tema de Dev con los detalles.

5 Me gusta

Ja. Si tienes suerte. Si no tienes tanta suerte, obtendrás un error completo y una detención total de la ejecución de JavaScript. Lo que puede resultar en páginas en blanco o corruptas.

Hasta ahora he encontrado varios problemas, pero en su mayoría la pérdida de algunos atributos del objeto Discourse y, por lo tanto, tienes que encontrar una forma diferente de acceder a los atributos del sitio y del usuario. (Pista: estos son accesibles dentro de los componentes. Puedes ver el trabajo que he hecho recientemente en el TLP TC)

2 Me gusta