This commit is contained in:
h z
2024-12-03 00:38:56 +00:00
commit 8bbfc10a39
6 changed files with 6838 additions and 0 deletions

38
webpack.config.js Normal file
View File

@@ -0,0 +1,38 @@
//webpack.config.js
const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');
module.exports = {
entry: './src/index.js',
output: {
path: path.resolve(__dirname, './dist'),
filename: 'bundle.js',
clean: true,
},
module: {
rules: [
{
test: /\.js$/,
exclude: /node_modules/,
use: {
loader: 'babel-loader',
}
},
{
test: /\.css$/,
use: ['style-loader', 'css-loader'],
}
]
},
plugins: [
new HtmlWebpackPlugin({
template: "./public/index.html",
})
],
devServer: {
static: path.join(__dirname, 'public'),
port: 3000,
open: true,
hot: true,
}
};