discourse/app
David Taylor 33a2624f09
DEV: Introduce flag for compiling Plugin JS with Ember CLI (#17965)
When `EMBER_CLI_PLUGIN_ASSETS=1`, plugin application JS will be compiled via Ember CLI. In this mode, the existing `register_asset` API will cause any registered JS files to be made available in `/plugins/{plugin-name}_extra.js`. These 'extra' files will be loaded immediately after the plugin app JS file, so this should not affect functionality.

Plugin compilation in Ember CLI is implemented as an addon, similar to the existing 'admin' addon. We bypass the normal Ember CLI compilation process (which would add the JS to the main app bundle), and reroute the addon Broccoli tree into a separate JS file per-plugin. Previously, Sprockets would add compiled templates directly to `Ember.TEMPLATES`. Under Ember CLI, they are compiled into es6 modules. Some new logic in `discourse-boot.js` takes care of remapping the new module names into the old-style `Ember.TEMPLATES`.

This change has been designed to be a like-for-like replacement of the old plugin compilation system, so we do not expect any breakage. Even so, the environment variable flag will allow us to test this in a range of environments before enabling it by default.

A manual silence implementation is added for the build-time `ember-glimmer.link-to.positional-arguments` deprecation while we work on a better story for plugins.
2022-08-22 09:56:39 +01:00
..
assets DEV: Introduce flag for compiling Plugin JS with Ember CLI (#17965) 2022-08-22 09:56:39 +01:00
controllers FIX: Allow `match_all_tags` to be passed as a URL param (#17972) 2022-08-19 15:41:56 -04:00
helpers UX: Improve safe-mode usability (#17929) 2022-08-15 15:15:15 +01:00
jobs FIX: Don't raise on deleted topic in UpdateHotlinkedRaw (#17901) 2022-08-13 22:40:26 +02:00
mailers FEATURE: Custom unsubscribe options (#17090) 2022-06-21 15:49:47 -03:00
models FEATURE: default sidebar categories and tags (#17939) 2022-08-22 08:46:20 +10:00
serializers FEATURE: default sidebar categories and tags (#17939) 2022-08-22 08:46:20 +10:00
services FIX: Remove last_unread_post excerpt logic for bookmarks (#17979) 2022-08-19 09:35:25 +10:00
views DEV: Introduce flag for compiling Plugin JS with Ember CLI (#17965) 2022-08-22 09:56:39 +01:00