Skip to content

Commit 4803225

Browse files
Update webpack.config.js
1 parent 1eea62f commit 4803225

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

webpack.config.js

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,28 @@
1+
const path = require('path');
2+
const HtmlWebpackPlugin = require('html-webpack-plugin');
13

4+
module.exports = {
5+
mode: 'development',
6+
entry: './src/index.js',
7+
devServer: {
8+
static: './dist',
9+
},
10+
plugins: [
11+
new HtmlWebpackPlugin({
12+
template: './src/index.html',
13+
}),
14+
],
15+
output: {
16+
filename: 'main.js',
17+
path: path.resolve(__dirname, 'dist'),
18+
clean: true,
19+
},
20+
module: {
21+
rules: [
22+
{
23+
test: /\.css$/i,
24+
use: ['style-loader', 'css-loader'],
25+
},
26+
],
27+
},
28+
};

0 commit comments

Comments
 (0)