Skip to content

Commit

Permalink
4.3. Настроит плагин в webpack.config.js
Browse files Browse the repository at this point in the history
  • Loading branch information
alisameta09 committed Feb 12, 2025
1 parent 7953bd6 commit add0238
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const path = require('path');
const CopyPlugin = require('copy-webpack-plugin');
const HtmlPlugin = require('html-webpack-plugin');

module.exports = {
entry: './src/main.js',
Expand All @@ -10,8 +11,18 @@ module.exports = {
},
devtool: 'source-map',
plugins: [
new HtmlPlugin ({
template: 'public/index.html',
}),
new CopyPlugin({
patterns: [{ from: 'public' }],
patterns: [
{
from: 'public',
globOptions: {
ignore: ['**/index.html'],
},
},
],
}),
],
module: {
Expand Down

0 comments on commit add0238

Please sign in to comment.