improve: add production stage

This commit is contained in:
h z
2024-12-09 07:01:22 +00:00
parent 0e6fd8409a
commit ba69541a7b
29 changed files with 616 additions and 92 deletions

View File

@@ -1,13 +1,13 @@
//webpack.config.js
const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const Dotenv = require('dotenv-webpack');
module.exports = {
entry: './src/index.js',
output: {
path: path.resolve(__dirname, './dist'),
filename: 'bundle.js',
publicPath: '/',
publicPath: './',
clean: true,
},
module: {
@@ -28,6 +28,7 @@ module.exports = {
plugins: [
new HtmlWebpackPlugin({
template: "./public/index.html",
inject: true
}),
],
devServer: {