1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Add webpack bundle for external dependencies

This commit is contained in:
Bill Thornton 2019-05-22 15:18:17 -04:00
parent ba9382e1bd
commit fa50f3521c
5 changed files with 528 additions and 17 deletions

9
src/bundle.js Normal file
View file

@ -0,0 +1,9 @@
/**
* require.js module definitions bundled by webpack
*/
// Use define from require.js not webpack's define
var _define = window.define;
var jstree = require("jstree");
require("jstree/dist/themes/default/style.css");
_define("jstree", ["jQuery"], function() { return jstree; });

View file

@ -817,12 +817,15 @@ var AppInfo = {};
text: "components/require/requiretext"
}
},
bundles: {
bundle: ["jstree"]
},
urlArgs: urlArgs,
paths: paths,
onError: onRequireJsError
});
requirejs.onError = onRequireJsError;
define("jstree", ["thirdparty/jstree/jstree", "css!thirdparty/jstree/themes/default/style.css"], returnFirstDependency);
define("dashboardcss", ["css!css/dashboard"], returnFirstDependency);
define("slideshow", [componentsPath + "/slideshow/slideshow"], returnFirstDependency);
define("fetch", [bowerPath + "/fetch/fetch"], returnFirstDependency);
@ -1144,7 +1147,7 @@ var AppInfo = {};
})();
require(["css!css/site"]);
return require(["browser"], onWebComponentsReady);
}();
pageClassOn("viewshow", "standalonePage", function () {