improve: add production stage
This commit is contained in:
@@ -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: {
|
||||
|
||||
Reference in New Issue
Block a user