1
0
mirror of https://github.com/home-assistant/frontend.git synced 2025-12-24 12:49:19 +00:00

Load icons via JS (#1211)

This commit is contained in:
Paulus Schoutsen
2018-05-26 11:50:03 -04:00
committed by GitHub
parent 29912d1b63
commit 71196b9704
11 changed files with 122 additions and 13 deletions

View File

@@ -64,6 +64,7 @@ function createConfig(isProdBuild, latestBuild) {
copyPluginOpts.push('node_modules/@webcomponents/webcomponentsjs/webcomponents-bundle.js')
copyPluginOpts.push({ from: 'node_modules/leaflet/dist/leaflet.css', to: `images/leaflet/` });
copyPluginOpts.push({ from: 'node_modules/leaflet/dist/images', to: `images/leaflet/` });
entry.mdi = './src/entrypoints/mdi.js';
} else {
copyPluginOpts.push('node_modules/@webcomponents/webcomponentsjs/custom-elements-es5-adapter.js');
babelOptions.presets = [
@@ -98,6 +99,15 @@ function createConfig(isProdBuild, latestBuild) {
loader: 'babel-loader',
options: babelOptions,
},
},
{
test: /\.(html)$/,
use: {
loader: 'html-loader',
options: {
exportAsEs6Default: true,
}
}
}
]
},