mirror of
https://github.com/luc-github/ESP3D-WEBUI.git
synced 2026-02-20 01:11:21 +01:00
rename repository of clicktogo as click2go as the extension name remove click2go console.log now is finalized bump click2go version to 1.0.1 and build package Remove auto toast messages in extensions API because it is extensions to handle toast on failure / success Bump webui version and build packages
55 lines
1.2 KiB
JavaScript
55 lines
1.2 KiB
JavaScript
const path = require('path');
|
|
const HtmlWebpackPlugin = require('html-webpack-plugin');
|
|
const CompressionPlugin = require('compression-webpack-plugin');
|
|
const FileManagerPlugin = require('filemanager-webpack-plugin');
|
|
|
|
const htmlFileName = 'click2go.html';
|
|
|
|
module.exports = {
|
|
entry: `./src/${htmlFileName}`,
|
|
output: {
|
|
path: path.resolve(__dirname, 'dist'),
|
|
},
|
|
module: {
|
|
rules: [
|
|
{
|
|
test: /\.html$/,
|
|
use: ['html-loader'],
|
|
},
|
|
{
|
|
test: /\.css$/,
|
|
use: ['style-loader', 'css-loader'],
|
|
},
|
|
{
|
|
test: /\.js$/,
|
|
use: ['babel-loader'],
|
|
},
|
|
],
|
|
},
|
|
plugins: [
|
|
new HtmlWebpackPlugin({
|
|
template: `./src/${htmlFileName}`,
|
|
filename: htmlFileName,
|
|
minify: {
|
|
collapseWhitespace: true,
|
|
removeComments: true,
|
|
},
|
|
inject: false,
|
|
}),
|
|
new CompressionPlugin({
|
|
filename: '[path][base].gz',
|
|
algorithm: 'gzip',
|
|
test: /\.html$/,
|
|
threshold: 0,
|
|
minRatio: 1,
|
|
}),
|
|
new FileManagerPlugin({
|
|
events: {
|
|
onEnd: {
|
|
delete: [`dist/${htmlFileName}`, 'dist/main.js'],
|
|
},
|
|
},
|
|
}),
|
|
],
|
|
};
|