Code split out more things (#1199)

This commit is contained in:
Paulus Schoutsen 2018-05-21 07:50:50 -04:00 committed by GitHub
parent 4d50ab937a
commit 8e6929659d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 12 additions and 9 deletions

View File

@ -36,7 +36,7 @@
#ha-init-skeleton::before { #ha-init-skeleton::before {
display: block; display: block;
content: ""; content: "";
height: 48px; height: 64px;
background-color: {{ theme_color }}; background-color: {{ theme_color }};
} }

View File

@ -1,6 +1,6 @@
/* polyfill for paper-dropdown */ /* eslint-disable import/first */
import 'web-animations-js/web-animations-next-lite.min.js'; // Load polyfill first so HTML imports start resolving
import '../resources/html-import/polyfill.js';
import '@polymer/app-route/app-location.js'; import '@polymer/app-route/app-location.js';
import '@polymer/app-route/app-route.js'; import '@polymer/app-route/app-route.js';
import '@polymer/iron-flex-layout/iron-flex-layout-classes.js'; import '@polymer/iron-flex-layout/iron-flex-layout-classes.js';
@ -17,10 +17,7 @@ import {
import translationMetadata from '../../build-translations/translationMetadata.json'; import translationMetadata from '../../build-translations/translationMetadata.json';
import '../layouts/home-assistant-main.js'; import '../layouts/home-assistant-main.js';
import '../layouts/login-form.js';
import '../managers/notification-manager.js';
import '../resources/ha-style.js'; import '../resources/ha-style.js';
import '../resources/html-import/polyfill.js';
import '../util/ha-pref-storage.js'; import '../util/ha-pref-storage.js';
import { getActiveTranslation, getTranslation } from '../util/hass-translation.js'; import { getActiveTranslation, getTranslation } from '../util/hass-translation.js';
import '../util/legacy-support'; import '../util/legacy-support';
@ -32,6 +29,12 @@ import '../components/ha-iconset-svg.js';
import computeStateName from '../common/entity/compute_state_name.js'; import computeStateName from '../common/entity/compute_state_name.js';
import applyThemesOnElement from '../common/dom/apply_themes_on_element.js'; import applyThemesOnElement from '../common/dom/apply_themes_on_element.js';
/* polyfill for paper-dropdown */
import(/* webpackChunkName: "polyfill-web-animations-next" */ 'web-animations-js/web-animations-next-lite.min.js');
import(/* webpackChunkName: "login-form" */ '../layouts/login-form.js');
import(/* webpackChunkName: "notification-manager" */ '../managers/notification-manager.js');
setPassiveTouchGestures(true); setPassiveTouchGestures(true);
/* LastPass createElement workaround. See #428 */ /* LastPass createElement workaround. See #428 */
document.createElement = Document.prototype.createElement; document.createElement = Document.prototype.createElement;

View File

@ -6,7 +6,6 @@ import '@polymer/iron-pages/iron-pages.js';
import { html } from '@polymer/polymer/lib/utils/html-tag.js'; import { html } from '@polymer/polymer/lib/utils/html-tag.js';
import { PolymerElement } from '@polymer/polymer/polymer-element.js'; import { PolymerElement } from '@polymer/polymer/polymer-element.js';
import '../components/ha-sidebar.js';
import '../util/ha-url-sync.js'; import '../util/ha-url-sync.js';
import './partial-cards.js'; import './partial-cards.js';
@ -14,6 +13,7 @@ import './partial-panel-resolver.js';
import EventsMixin from '../mixins/events-mixin.js'; import EventsMixin from '../mixins/events-mixin.js';
import NavigateMixin from '../mixins/navigate-mixin.js'; import NavigateMixin from '../mixins/navigate-mixin.js';
import(/* webpackChunkName: "ha-sidebar" */ '../components/ha-sidebar.js');
import(/* webpackChunkName: "more-info-dialog" */ '../dialogs/ha-more-info-dialog.js'); import(/* webpackChunkName: "more-info-dialog" */ '../dialogs/ha-more-info-dialog.js');
import(/* webpackChunkName: "voice-command-dialog" */ '../dialogs/ha-voice-command-dialog.js'); import(/* webpackChunkName: "voice-command-dialog" */ '../dialogs/ha-voice-command-dialog.js');

View File

@ -84,7 +84,7 @@ function createConfig(isProdBuild, latestBuild) {
} }
const chunkFilename = isProdBuild ? const chunkFilename = isProdBuild ?
'[name]-[chunkhash].chunk.js' : '[name].chunk.js'; '[chunkhash].chunk.js' : '[name].chunk.js';
return { return {
mode: isProdBuild ? 'production' : 'development', mode: isProdBuild ? 'production' : 'development',