add webpack

This commit is contained in:
grinikita
2025-03-22 13:14:06 +03:00
parent 0f2c268452
commit 1597b52310
13 changed files with 2313 additions and 12 deletions
+24
View File
@@ -0,0 +1,24 @@
const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const CopyPlugin = require("copy-webpack-plugin");
module.exports = {
entry: './src/index.js',
output: {
filename: 'index.js',
path: path.resolve(__dirname, 'dist'),
clean: true
},
module: {},
plugins: [
new HtmlWebpackPlugin({
template: "./src/index.html"
}),
new CopyPlugin({
patterns: [
{from: "./src/style.css", to: "style.css"},
{from: "./src/images", to: "images"},
],
})
]
};