Bug 1494162 - Part 32: Lazy load Grid components. r=pbro

This commit is contained in:
Gabriel Luong 2018-10-02 11:20:51 -04:00
Родитель 3ee7394331
Коммит 5dab8a6e0d
1 изменённых файлов: 12 добавлений и 3 удалений

Просмотреть файл

@ -9,9 +9,18 @@ const dom = require("devtools/client/shared/vendor/react-dom-factories");
const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
const { getStr } = require("devtools/client/inspector/layout/utils/l10n");
const GridDisplaySettings = createFactory(require("./GridDisplaySettings"));
const GridList = createFactory(require("./GridList"));
const GridOutline = createFactory(require("./GridOutline"));
// Normally, we would only lazy load GridOutline, but we also lazy load
// GridDisplaySettings and GridList because we assume the CSS grid usage is low
// and usually will not appear on the page.
loader.lazyGetter(this, "GridDisplaySettings", function() {
return createFactory(require("./GridDisplaySettings"));
});
loader.lazyGetter(this, "GridList", function() {
return createFactory(require("./GridList"));
});
loader.lazyGetter(this, "GridOutline", function() {
return createFactory(require("./GridOutline"));
});
const Types = require("../types");