DEV: Add the missing app subdirectory (#9499)

* DEV: Add missing  directory to the Discourse ember app

* DEV: Resolve imports correctly
This commit is contained in:
Roman Rizzi
2020-04-23 10:07:54 -03:00
committed by GitHub
parent 8e28ccb2ea
commit 7a2e8d3ead
1160 changed files with 106 additions and 101 deletions

View File

@@ -65,7 +65,11 @@ class Ember::Handlebars::Template
end
def global_template_target(namespace, module_name, config)
"#{namespace}[#{template_path(module_name, config).inspect}]"
# We need this for backward-compatibility reasons.
# Plugins may not have an app subdirectory.
path = template_path(module_name, config).inspect.gsub('discourse/templates/', '')
"#{namespace}[#{path}]"
end
# FIXME: Previously, ember-handlebars-templates uses the logical path which incorrectly