-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.dev.js
48 lines (47 loc) · 1.24 KB
/
webpack.config.dev.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-template-curly-in-string */
const path = require('path');
module.exports = {
entry: './src/App.jsx',
output: {
path: path.resolve(__dirname, 'static/app'),
filename: 'client.js',
},
mode: 'development',
devtool: 'eval-source-map',
resolve: {
extensions: ['.js', '.jsx'],
},
module: {
rules: [
{
test: /\.jsx?$/,
exclude: /(node_modules|bower_components)/,
use: {
loader: 'babel-loader',
options: {
presets: ['@babel/preset-react', ['@babel/preset-env', {
targets: {
firefox: 69,
chrome: 76,
},
}]],
plugins: ['@babel/plugin-proposal-object-rest-spread',
[
'babel-plugin-transform-imports',
{
'@material-ui/core': {
transform: '@material-ui/core/esm/${member}',
preventFullImport: true,
},
'@material-ui/icons': {
transform: '@material-ui/icons/esm/${member}',
preventFullImport: true,
},
},
]],
},
},
},
],
},
};