discourse/app/views
Godfrey Chan e1373c3e84
DEV: introduce Embroider behind a flag, and start testing in CI (#23005)
Discourse core now builds and runs with Embroider! This commit adds
the Embroider-based build pipeline (`USE_EMBROIDER=1`) and start
testing it on CI.

The new pipeline uses Embroider's compat mode + webpack bundler to
build discourse code, and leave everything else (admin, wizard,
markdown-it, plugins, etc) exactly the same using the existing
Broccoli-based build as external bundles (<script> tags), passed
to the build as `extraPublicTress` (which just means they get
placed in the `/public` folder).

At runtime, these "external" bundles are glued back together with
`loader.js`. Specifically, the external bundles are compiled as
AMD modules (just as they were before) and registered with the
global `loader.js` instance. They expect their `import`s (outside
of whatever is included in the bundle) to be already available in
the `loader.js` runtime registry.

In the classic build, _every_ module gets compiled into AMD and
gets added to the `loader.js` runtime registry. In Embroider,
the goal is to do this as little as possible, to give the bundler
more flexibility to optimize modules, or omit them entirely if it
is confident that the module is unused (i.e. tree-shaking).

Even in the most compatible mode, there are cases where Embroider
is confident enough to omit modules in the runtime `loader.js`
registry (notably, "auto-imported" non-addon NPM packages). So we
have to be mindful of that an manage those dependencies ourselves,
as seen in #22703.

In the longer term, we will look into using modern features (such
as `import()`) to express these inter-dependencies.

This will only be behind a flag for a short period of time while we
perform some final testing. Within the next few weeks, we intend
to enable by default and remove the flag.

---------

Co-authored-by: David Taylor <david@taylorhq.com>
2023-09-07 13:15:43 +01:00
..
about FEATURE: Add plugin API to register About stat group (#17442) 2022-07-15 13:16:00 +10:00
admin/backups
application FIX: Offer site_logo_dark_url as an option for dark mode themes (#14361) 2021-09-16 17:47:51 -04:00
badges
categories UX: Include subcategories in crawler view (#21227) 2023-04-25 10:51:45 -04:00
common SECURITY: Don't reuse CSP nonce between anonymous requests 2023-07-28 12:53:44 +01:00
default
email FIX: Validate unsubscribe key has an associated user (#19262) 2022-11-30 14:29:07 -03:00
embed FIX: Ensure embedded replies/reply-to links open in _blank (#14597) 2021-10-13 21:34:30 +01:00
exceptions FEATURE: Add page title to 404 pages (#16846) 2022-05-17 18:37:43 +03:00
finish_installation FIX: Broken images on subfolder installs (#19404) 2022-12-09 11:24:12 -07:00
groups FEATURE: add title tag for group detail page (#13702) 2021-07-12 20:05:57 +05:30
invites FIX: broken emoji url on password reset w/ subfolder (#19373) 2022-12-09 10:01:43 -07:00
layouts PERF: Cache ToS and Privacy Policy paths (#21860) 2023-06-07 21:31:20 +03:00
list PERF: Avoid calling the same translation twice when rendering lists view (#22976) 2023-08-04 13:38:41 +08:00
metadata
offline UX: Remove Helvetica from our font stack (#11876) 2021-02-05 17:01:21 -05:00
posts FEATURE: use canonical links in posts.rss feed (#16190) 2022-03-15 20:17:06 +11:00
published_pages FIX: use normal logo in published pages if small not available. 2020-09-21 09:20:39 +05:30
qunit DEV: introduce Embroider behind a flag, and start testing in CI (#23005) 2023-09-07 13:15:43 +01:00
robots_txt FEATURE: Let sites add a sitemap.xml file. (#16357) 2022-04-12 10:33:59 -03:00
safe_mode UX: Improve safe-mode usability (#17929) 2022-08-15 15:15:15 +01:00
search
session FEATURE: Rename 'Discourse SSO' to DiscourseConnect (#11978) 2021-02-08 10:04:33 +00:00
sitemap FEATURE: Let sites add a sitemap.xml file. (#16357) 2022-04-12 10:33:59 -03:00
static DEV: add class for static login description section (#22002) 2023-06-08 19:51:41 +05:30
tags FIX: Use new tag routes (#8683) 2020-01-21 19:23:08 +02:00
topics FEATURE: add category name in articleSection meta tag for schema. (#21004) 2023-04-06 23:30:19 +05:30
user_api_keys
user_notifications FIX: Likes received count in digest email (#21458) 2023-05-09 19:19:26 +02:00
users FIX: Broken images on subfolder installs (#19404) 2022-12-09 11:24:12 -07:00
users_email UX: add btn-primary class on email confirm page (#19803) 2023-01-09 15:26:56 -05:00