mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 22:43:33 +08:00
DEV: Update ember-cli-htmlbars to 6.2.0 (#20467)
* Build(deps): Bump ember-cli-htmlbars in /app/assets/javascripts Bumps [ember-cli-htmlbars](https://github.com/ember-cli/ember-cli-htmlbars) from 6.1.1 to 6.2.0. - [Release notes](https://github.com/ember-cli/ember-cli-htmlbars/releases) - [Changelog](https://github.com/ember-cli/ember-cli-htmlbars/blob/master/CHANGELOG.md) - [Commits](https://github.com/ember-cli/ember-cli-htmlbars/compare/v6.1.1...v6.2.0) --- updated-dependencies: - dependency-name: ember-cli-htmlbars dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * Load additional files * Update code --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
|
||||
// This is executed in mini_racer to provide the JS logic for lib/discourse_js_processor.rb
|
||||
|
||||
const makeEmberTemplateCompilerPlugin =
|
||||
const HTMLBarsInlinePrecompile =
|
||||
require("babel-plugin-ember-template-compilation").default;
|
||||
const colocatedBabelPlugin = require("colocated-babel-plugin").default;
|
||||
const precompile = require("ember-template-compiler").precompile;
|
||||
@ -38,9 +38,10 @@ function buildEmberTemplateManipulatorPlugin(themeId) {
|
||||
}
|
||||
|
||||
function buildTemplateCompilerBabelPlugins({ themeId }) {
|
||||
let compileFunction = precompile;
|
||||
const compiler = { precompile };
|
||||
|
||||
if (themeId) {
|
||||
compileFunction = (src, opts) => {
|
||||
compiler.precompile = (src, opts) => {
|
||||
return precompile(src, {
|
||||
...opts,
|
||||
plugins: {
|
||||
@ -54,8 +55,11 @@ function buildTemplateCompilerBabelPlugins({ themeId }) {
|
||||
colocatedBabelPlugin,
|
||||
require("widget-hbs-compiler").WidgetHbsCompiler,
|
||||
[
|
||||
makeEmberTemplateCompilerPlugin(() => compileFunction),
|
||||
{ enableLegacyModules: ["ember-cli-htmlbars"] },
|
||||
HTMLBarsInlinePrecompile,
|
||||
{
|
||||
compiler,
|
||||
enableLegacyModules: ["ember-cli-htmlbars"],
|
||||
},
|
||||
],
|
||||
];
|
||||
}
|
||||
|
Reference in New Issue
Block a user