forked from jonaustin/github-to-ec2-pipeline
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.common.js
executable file
·45 lines (44 loc) · 1011 Bytes
/
webpack.common.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
const path = require('path')
const webpack = require('webpack')
const HtmlWebPackPlugin = require('html-webpack-plugin')
module.exports = {
output: {
path: path.join(__dirname, 'dist'),
publicPath: '/',
filename: '[name].js'
},
target: 'web',
module: {
rules: [
{
enforce: "pre",
test: /\.jsx?$/,
exclude: /node_modules/,
loader: "eslint-loader",
options: {
emitWarning: true,
failOnError: false,
failOnWarning: false
}
},
{
test: /\.jsx?$/,
exclude: /node_modules/,
loader: "babel-loader"
}
]
},
resolve: {
extensions: ['.js', '.jsx'],
},
plugins: [
new HtmlWebPackPlugin({
template: "./src/client/index.html",
filename: "./index.html",
favicon: "./src/client/img/favicon.ico",
excludeChunks: ['server']
}),
new webpack.NoEmitOnErrorsPlugin(),
new webpack.WatchIgnorePlugin(["./dist", "./build"])
]
}