mirror of
https://github.com/home-assistant/frontend.git
synced 2025-11-08 02:19:43 +00:00
Build a new Hass.io panel (#1271)
* Build a new Hass.io panel * Use webcomponents-lite.js * Compress new panel * Lint
This commit is contained in:
@@ -2,6 +2,7 @@ const fs = require('fs');
|
||||
const path = require('path');
|
||||
const webpack = require('webpack');
|
||||
const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
|
||||
const CompressionPlugin = require("compression-webpack-plugin");
|
||||
const config = require('./config.js');
|
||||
|
||||
const version = fs.readFileSync('../setup.py', 'utf8').match(/\d{8}[^']*/);
|
||||
@@ -29,6 +30,15 @@ if (isProdBuild) {
|
||||
mangle: false,
|
||||
}
|
||||
}));
|
||||
plugins.push(new CompressionPlugin({
|
||||
cache: true,
|
||||
exclude: [
|
||||
/\.js\.map$/,
|
||||
/\.LICENSE$/,
|
||||
/\.py$/,
|
||||
/\.txt$/,
|
||||
]
|
||||
}));
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
@@ -37,7 +47,7 @@ module.exports = {
|
||||
// Was source-map
|
||||
devtool: isProdBuild ? 'none' : 'inline-source-map',
|
||||
entry: {
|
||||
app: './src/hassio-app.js',
|
||||
entrypoint: './src/entrypoint.js',
|
||||
},
|
||||
module: {
|
||||
rules: [
|
||||
|
||||
Reference in New Issue
Block a user