Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion library/Icinga/Web/JavaScript.php
Original file line number Diff line number Diff line change
Expand Up @@ -238,8 +238,9 @@ public static function optimizeDefine($js, $filePath, $basePath, $packageName)
try {
$dependencies = $match[2] ? Json::decode($match[2]) : [];
foreach ($dependencies as &$dependencyName) {
if ($dependencyName === 'exports') {
if ($dependencyName === 'exports' || str_starts_with($dependencyName, 'icinga/legacy-app/')) {
// exports is a special keyword and doesn't need optimization
// 'app/legacy-app/...' is a custom-defined path and doesn’t need optimization either.
continue;
}

Expand Down
2 changes: 2 additions & 0 deletions public/js/icinga.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@
this.events = new Icinga.Events(this);
this.history = new Icinga.History(this);

define("icinga/legacy-app/Icinga", [], () => Icinga);

// Initialize all available behaviors
for (const name in Icinga.Behaviors) {
const behavior = new Icinga.Behaviors[name](this);
Expand Down
Loading