-
Notifications
You must be signed in to change notification settings - Fork 11
/
webpack.config.js
116 lines (115 loc) · 3.48 KB
/
webpack.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
module.exports = {
entry: {
main: './src/index.js',
layout: './src/layout.js',
content: './src/content.js',
},
output: {
path: path.resolve(__dirname, 'dist'),
filename: '[name].js',
publicPath: '',
},
mode: 'development',
devServer: {
static: path.resolve(__dirname, './dist'),
open: true,
compress: true,
port: 8080
},
module: {
rules: [{
test: /\.js$/,
use: 'babel-loader',
exclude: '/node_modules/'
},
{
test: /\.(png|svg|jpg|gif|woff(2)?|eot|ttf|otf)$/,
type: 'asset/resource',
},
{
test: /\.css$/,
use: [MiniCssExtractPlugin.loader, {
loader: 'css-loader',
options: {
importLoaders: 1
}
},
'postcss-loader'
]
},
]
},
plugins: [
new HtmlWebpackPlugin({
filename: 'ui-kit.html',
template: './src/ui-kit.html',
inject: 'body'
}),
new HtmlWebpackPlugin({
filename: 'index.html',
template: './src/index.html',
inject: 'body'
}),
new HtmlWebpackPlugin({
filename: 'lk-competencies.html',
template: './src/lk-competencies.html',
inject: 'body'
}),
new HtmlWebpackPlugin({
filename: 'lk-motivation.html',
template: './src/lk-motivation.html',
inject: 'body'
}),
new HtmlWebpackPlugin({
filename: 'lk-personal-data.html',
template: './src/lk-personal-data.html',
inject: 'body'
}),
new HtmlWebpackPlugin({
filename: 'lk-portfolio.html',
template: './src/lk-portfolio.html',
inject: 'body'
}),
new HtmlWebpackPlugin({
filename: 'lk-social.html',
template: './src/lk-social.html',
inject: 'body'
}),
new HtmlWebpackPlugin({
filename: 'registration.html',
template: './src/registration.html',
inject: 'body'
}),
new HtmlWebpackPlugin({
filename: 'registration-first-step.html',
template: './src/registration-first-step.html',
inject: 'body'
}),
new HtmlWebpackPlugin({
filename: 'registration-new-volunteer.html',
template: './src/registration-new-volunteer.html',
inject: 'body'
}),
new HtmlWebpackPlugin({
filename: 'settings-change-password.html',
template: './src/settings-change-password.html',
inject: 'body'
}),
new HtmlWebpackPlugin({
filename: 'settings-notifications.html',
template: './src/settings-notifications.html',
inject: 'body'
}),
new HtmlWebpackPlugin({
filename: 'settings-profile.html',
template: './src/settings-profile.html',
inject: 'body'
}),
new CleanWebpackPlugin(),
new MiniCssExtractPlugin()
]
}