-
Notifications
You must be signed in to change notification settings - Fork 7
/
webpack.config.js
48 lines (45 loc) · 1.02 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
/* eslint-disable no-undef */
module.exports = {
// https://webpack.js.org/concepts/mode/
mode: 'development',
entry: [
'babel-polyfill',
'./src/index.js'
],
output: {
path: __dirname,
publicPath: '/',
filename: 'bundle.js'
},
module: {
rules: [{
test: /(\.js$|\.jsx$)/,
exclude: /(node_modules|bower_components)/,
use: [{
loader: 'babel-loader',
options: {
presets: ['@babel/preset-env', '@babel/preset-react']
}
}]
}]
},
resolve: {
extensions: [
'.js', '.jsx'
]
},
devServer: {
historyApiFallback: true,
contentBase: './'
}
// plugins: [
// new webpack.DefinePlugin({
// DEVELOPMENT: JSON.stringify(true),
// AWS_REGION: JSON.stringify('us-east-1'),
// AWS_COGNITO_IDENTITY_POOL_ID: JSON.stringify('us-east-1:XYZ'),
// AWS_COGNITO_USER_POOL_ID: JSON.stringify('us-east-1_XYZ'),
// AWS_COGNITO_CLIENT_ID: JSON.stringify('XYZ')
// })
// ]
};
/* eslint-enable no-undef */