- webpack config separation for development and production

- load only the necessary classes from leaflet
This commit is contained in:
Arno Kaimbacher 2021-08-25 17:52:09 +02:00
parent 7857e2c5bb
commit bc44385846
13 changed files with 883 additions and 209 deletions

15
webpack.production.js Normal file
View file

@ -0,0 +1,15 @@
const { merge } = require('webpack-merge');
const common = require('./webpack.common.js');
const HtmlWebpackPlugin = require('html-webpack-plugin');
module.exports = merge(common, {
mode: 'production',
devtool: 'source-map',
plugins: [
new HtmlWebpackPlugin({
template: './src/index.tmp.html',
title: 'sensor viewer',
})
],
});