const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const CssMinimizerPlugin = require('css-minimizer-webpack-plugin');
const HtmlInlineScriptPlugin = require('html-inline-script-webpack-plugin');
const HTMLInlineCSSWebpackPlugin =
require('html-inline-css-webpack-plugin').default;
const PATHS = {
entryPoint: path.resolve(__dirname, 'src/index.ts'),
entryHtml: path.resolve(__dirname, 'src/index.html'),
bundles: path.resolve(__dirname, 'dist'),
};
// Inline the UI SVGs referenced via
into the HTML (replacing the
// abandoned html-webpack-inline-svg-plugin). Scope html-loader to
so
// the favicon tags are left to resolve against the emitted files.
const htmlLoaderOptions = JSON.stringify({
sources: { list: [{ tag: 'img', attribute: 'src', type: 'src' }] },
minimize: false,
});
module.exports = {
entry: {
index: PATHS.entryPoint,
},
target: 'web',
output: {
path: PATHS.bundles,
// The bundle is inlined into index.html (no