From f697133b7dac400d4c1fc9ab662ee3265ad83a61 Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Wed, 29 Apr 2020 16:14:35 -0400 Subject: [PATCH] DEV: Add Handlebars support to Ember CLI in discourse-common --- app/assets/javascripts/discourse-common/index.js | 9 ++++++++- app/assets/javascripts/discourse-common/package.json | 5 +++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/app/assets/javascripts/discourse-common/index.js b/app/assets/javascripts/discourse-common/index.js index e8db57f9150..7ad7fe9113c 100644 --- a/app/assets/javascripts/discourse-common/index.js +++ b/app/assets/javascripts/discourse-common/index.js @@ -1,5 +1,12 @@ "use strict"; module.exports = { - name: require("./package").name + name: require("./package").name, + options: { + autoImport: { + alias: { + handlebars: "handlebars/dist/cjs/handlebars.js" + } + } + } }; diff --git a/app/assets/javascripts/discourse-common/package.json b/app/assets/javascripts/discourse-common/package.json index f56ec8cce49..bdd317efb46 100644 --- a/app/assets/javascripts/discourse-common/package.json +++ b/app/assets/javascripts/discourse-common/package.json @@ -18,14 +18,15 @@ }, "dependencies": { "ember-cli-babel": "^7.13.0", - "ember-cli-htmlbars": "^4.2.0" + "ember-cli-htmlbars": "^4.2.0", + "ember-auto-import": "^1.5.3", + "handlebars": "^4.7.0" }, "devDependencies": { "@ember/optional-features": "^1.1.0", "@glimmer/component": "^1.0.0", "babel-eslint": "^10.0.3", "broccoli-asset-rev": "^3.0.0", - "ember-auto-import": "^1.5.3", "ember-cli": "~3.15.2", "ember-cli-dependency-checker": "^3.2.0", "ember-cli-eslint": "^5.1.0",