-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.common.js
More file actions
33 lines (32 loc) · 862 Bytes
/
webpack.common.js
File metadata and controls
33 lines (32 loc) · 862 Bytes
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
const path = require('path');
const HtmlPlugin = require('html-webpack-plugin');
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
module.exports = {
entry: {
app: './src/main.js'
},
module: {
rules: [
{ test: /\.css$/i, loader: 'style-loader!css-loader' },
{ test: /\.(ttf|woff|woff2)$/i, loader: 'file-loader?name=fonts/[name].[ext]' }
]
},
plugins: [
new CleanWebpackPlugin(),
new HtmlPlugin({
favicon: path.resolve(__dirname, 'src', 'img', 'shapes.png'),
meta: {
'viewport': 'width=device-width, initial-scale=1, shrink-to-fit=no',
'X-UA-Compatible': {
'http-equiv': 'X-UA-Compatible',
'content': 'IE=edge'
}
},
title: 'Tetris JS'
})
],
output: {
path: path.resolve(__dirname, 'dist'),
filename: 'bundle.js'
}
};