mirror of
https://github.com/discourse/discourse.git
synced 2025-05-25 19:29:34 +08:00
FIX: Build was broken because uglify can't accept let
or const
For now we can live with `var`.
This commit is contained in:
@ -1,15 +1,15 @@
|
|||||||
var define, requirejs;
|
var define, requirejs;
|
||||||
|
|
||||||
(function () {
|
(function () {
|
||||||
let JS_MODULES = {};
|
var JS_MODULES = {};
|
||||||
const ALIASES = {
|
var ALIASES = {
|
||||||
"ember-addons/ember-computed-decorators":
|
"ember-addons/ember-computed-decorators":
|
||||||
"discourse-common/utils/decorators",
|
"discourse-common/utils/decorators",
|
||||||
"discourse/lib/raw-templates": "discourse-common/lib/raw-templates",
|
"discourse/lib/raw-templates": "discourse-common/lib/raw-templates",
|
||||||
"preload-store": "discourse/lib/preload-store",
|
"preload-store": "discourse/lib/preload-store",
|
||||||
"fixtures/user_fixtures": "discourse/tests/fixtures/user-fixtures",
|
"fixtures/user_fixtures": "discourse/tests/fixtures/user-fixtures",
|
||||||
};
|
};
|
||||||
const ALIAS_PREPEND = {
|
var ALIAS_PREPEND = {
|
||||||
fixtures: "discourse/tests/",
|
fixtures: "discourse/tests/",
|
||||||
helpers: "discourse/tests/",
|
helpers: "discourse/tests/",
|
||||||
};
|
};
|
||||||
@ -304,10 +304,10 @@ var define, requirejs;
|
|||||||
}
|
}
|
||||||
|
|
||||||
function transformForAliases(name) {
|
function transformForAliases(name) {
|
||||||
let alias = ALIASES[name];
|
var alias = ALIASES[name];
|
||||||
if (!alias) {
|
if (!alias) {
|
||||||
let segment = name.split("/")[0];
|
var segment = name.split("/")[0];
|
||||||
let prepend = ALIAS_PREPEND[segment];
|
var prepend = ALIAS_PREPEND[segment];
|
||||||
if (!prepend) {
|
if (!prepend) {
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user