mirror of
https://github.com/luc-github/ESP3D-WEBUI.git
synced 2026-02-20 01:11:21 +01:00
Add Circle/CheckCircle icons for menus Add .menu-item-panel css to be sure mouse click is taken in account Comment some logs Add prettierrc for each extension Add code base for gcodeViewer extension - WIP
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 = 'gcodeViewer.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'],
|
|
},
|
|
},
|
|
}),
|
|
],
|
|
};
|