1
0
mirror of https://gitlab.com/psono/psono-admin-client synced 2025-04-19 03:22:17 +03:00
psono-admin-client/webpack.dev.js
Sascha Pfeiffer eebceacc79 Upgraded dependencies
Signed-off-by: Sascha Pfeiffer <sascha.pfeiffer@esaqa.com>
2025-04-05 11:14:41 +02:00

41 lines
1.0 KiB
JavaScript

const { merge } = require('webpack-merge');
const common = require('./webpack.common.js');
const path = require('path');
const webpack = require('webpack');
const HtmlWebpackPlugin = require('html-webpack-plugin');
module.exports = merge(common, {
mode: 'development',
devtool: 'inline-source-map',
devServer: {
static: {
directory: path.join(__dirname, 'public'),
},
hot: true,
historyApiFallback: {
disableDotRule: true,
index: '/portal/',
},
port: 3000,
client: {
overlay: {
errors: true,
warnings: false,
},
},
},
plugins: [
new webpack.DefinePlugin({
'process.env.NODE_ENV': JSON.stringify('development'),
'process.env.PUBLIC_URL': JSON.stringify('/portal'),
}),
// Replace HtmlWebpackPlugin to use template processing
new HtmlWebpackPlugin({
inject: true,
template: path.resolve(__dirname, 'public/index.html'),
templateParameters: {
PUBLIC_URL: '/portal',
},
}),
],
});