DEV: Improve colocated component rootName logic (#18708)

The complex regex-based detection was based on Ember CLI's implementation, which is necessarily generic and needs to auto-detect the name. In our case, we know the name of the plugin so we can just pass it in - no need for dynamic detection. This resolves issues when there are other files in the `discourse/plugins/{name}` directory which are sorted before `discourse/`
This commit is contained in:
David Taylor
2022-10-21 20:20:46 +01:00
committed by GitHub
parent db0dbdf89a
commit 0a33c507d9
2 changed files with 7 additions and 12 deletions

View File

@ -171,7 +171,7 @@ module.exports = {
tree = RawHandlebarsCompiler(tree);
tree = new DiscoursePluginColocatedTemplateProcessor(tree);
tree = new DiscoursePluginColocatedTemplateProcessor(tree, pluginName);
tree = this.compileTemplates(tree);
tree = this.processedAddonJsFiles(tree);