Skip to content

Commit

Permalink
Added configuration for final bundle
Browse files Browse the repository at this point in the history
  • Loading branch information
LordKa0S committed Jul 18, 2021
1 parent f88f4ab commit 0825950
Showing 1 changed file with 57 additions and 0 deletions.
57 changes: 57 additions & 0 deletions webpack.dist.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');

module.exports = {
module: {
rules: [
{
test: /\.html$/i,
loader: 'html-loader',
include: [
path.resolve(__dirname, "html"),
],
},
{
test: /\.(png|svg|jpg|jpeg|gif)$/i,
type: 'asset/resource',
include: [
path.resolve(__dirname, "img"),
],
},
{
test: /\.css$/i,
type: 'asset/resource',
include: [
path.resolve(__dirname, "css"),
],
},
],
},
plugins: [
new HtmlWebpackPlugin({
filename: 'index.html',
template: 'html/index.html',
}),
new HtmlWebpackPlugin({
filename: 'news.html',
template: 'html/news.html',
}),
new HtmlWebpackPlugin({
filename: 'download.html',
template: 'html/download.html',
}),
new HtmlWebpackPlugin({
filename: 'team.html',
template: 'html/team.html',
}),
new HtmlWebpackPlugin({
filename: 'donate.html',
template: 'html/donate.html',
}),
],
output: {
filename: '[name].bundle.js',
path: path.resolve(__dirname, 'dist'),
clean: true,
},
};

0 comments on commit 0825950

Please sign in to comment.