DEV: Apply raw-hbs compilation via ember-cli-build.js (#24384)

Previously, the discourse-hbr plugin took the entire app tree as its input, and the result would then be merged into the app. This is wasteful and more likely to cause problems in the build pipeline.

See also https://github.com/discourse/discourse/pull/24376
This commit is contained in:
David Taylor 2023-11-15 15:20:32 +00:00 committed by GitHub
parent 2e520468a8
commit bb941cc850
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 6 deletions

View File

@ -1,11 +1,5 @@
"use strict";
const rawHandlebarsCompiler = require("./raw-handlebars-compiler");
module.exports = {
name: require("./package").name,
treeForApp() {
return rawHandlebarsCompiler(this.app.trees.app);
},
};

View File

@ -14,6 +14,7 @@ const generateWorkboxTree = require("./lib/workbox-tree-builder");
const { compatBuild } = require("@embroider/compat");
const { Webpack } = require("@embroider/webpack");
const { StatsWriterPlugin } = require("webpack-stats-plugin");
const RawHandlebarsCompiler = require("discourse-hbr/raw-handlebars-compiler");
process.env.BROCCOLI_ENABLED_MEMOIZE = true;
@ -72,6 +73,10 @@ module.exports = function (defaults) {
},
historySupportMiddleware: false,
trees: {
app: RawHandlebarsCompiler("app"),
},
});
// TODO: remove me