mirror of
https://github.com/discourse/discourse.git
synced 2025-09-06 10:50:21 +08:00
REFACTOR: Do not rely on module order for discourse-markdown loading
Before this patch, discourse-markdown depended on the modules in its bundle being defined in a specific order or it wouldn't load properly. Now, any file in the bundle can export a `priority` const (default 0) and files will be loaded in order of ascending priority instead. This allows us to use a bundle packaged in any order we want.
This commit is contained in:
parent
23abd0d953
commit
ba3014f9f9
3 changed files with 24 additions and 33 deletions
|
@ -61,6 +61,9 @@ function buildScaleButton(selectedScale, scale) {
|
|||
);
|
||||
}
|
||||
|
||||
// We need this to load after `upload-protocol` which is priority 0
|
||||
export const priority = 1;
|
||||
|
||||
export function setup(helper) {
|
||||
const opts = helper.getOptions();
|
||||
if (opts.previewing) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue