mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-25 18:26:35 +00:00
Add es5 adapter to es5 panel
This commit is contained in:
parent
10c997b7b2
commit
f8c2e9d476
@ -25,6 +25,10 @@ function setProperties(properties) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function initialize(panel, properties) {
|
function initialize(panel, properties) {
|
||||||
|
const style = document.createElement('style');
|
||||||
|
style.innerHTML = 'body{margin:0}';
|
||||||
|
document.head.appendChild(style);
|
||||||
|
|
||||||
const config = panel.config._panel_custom;
|
const config = panel.config._panel_custom;
|
||||||
let start = Promise.resolve();
|
let start = Promise.resolve();
|
||||||
|
|
||||||
|
@ -37,7 +37,10 @@ function createConfig(isProdBuild, latestBuild) {
|
|||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|
||||||
const copyPluginOpts = [];
|
const copyPluginOpts = [
|
||||||
|
// Leave here until Hass.io no longer references the ES5 build.
|
||||||
|
'node_modules/@webcomponents/webcomponentsjs/custom-elements-es5-adapter.js'
|
||||||
|
];
|
||||||
|
|
||||||
const plugins = [
|
const plugins = [
|
||||||
new webpack.DefinePlugin({
|
new webpack.DefinePlugin({
|
||||||
@ -69,7 +72,6 @@ function createConfig(isProdBuild, latestBuild) {
|
|||||||
copyPluginOpts.push('node_modules/@webcomponents/webcomponentsjs/webcomponents-bundle.js.map')
|
copyPluginOpts.push('node_modules/@webcomponents/webcomponentsjs/webcomponents-bundle.js.map')
|
||||||
copyPluginOpts.push({ from: 'node_modules/leaflet/dist/leaflet.css', to: `images/leaflet/` });
|
copyPluginOpts.push({ from: 'node_modules/leaflet/dist/leaflet.css', to: `images/leaflet/` });
|
||||||
copyPluginOpts.push({ from: 'node_modules/leaflet/dist/images', to: `images/leaflet/` });
|
copyPluginOpts.push({ from: 'node_modules/leaflet/dist/images', to: `images/leaflet/` });
|
||||||
copyPluginOpts.push('node_modules/@webcomponents/webcomponentsjs/custom-elements-es5-adapter.js');
|
|
||||||
entry['hass-icons'] = './src/entrypoints/hass-icons.js';
|
entry['hass-icons'] = './src/entrypoints/hass-icons.js';
|
||||||
entry['service-worker-hass'] = './src/entrypoints/service-worker-hass.js';
|
entry['service-worker-hass'] = './src/entrypoints/service-worker-hass.js';
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user