forked from andrewcapodieci/golden-layout-react-redux
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
49 lines (46 loc) · 1.24 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
49
const path = require('path')
const webpack = require('webpack')
module.exports = {
devtool: 'eval-source-map',
entry: [
'react-hot-loader/patch',
'webpack-hot-middleware/client',
path.resolve('src/index.js'),
],
output: {
filename: 'bundle.js',
path: path.resolve(__dirname, 'dist'),
publicPath: '/dist/',
},
module: {
rules: [
{
test: /\.jsx?/,
// Don't use .babelrc in `yarn link`-ed dependency's directory and use in current direction instead
//loader: 'babel-loader?babelrc=false&extends=' + path.resolve(__dirname, '.babelrc')
use: [{
loader: 'babel-loader',
options: {
babelrc: false, // Tells webpack not to use the .babelrc file
presets: [
['babel-preset-env', {
"targets": { "firefox": 52, "chrome": 55 },
"modules": false,
"loose": true
}],
'react' // Transform JSX into React.createElement calls
]
}
}]
}
],
},
plugins: [
new webpack.HotModuleReplacementPlugin(),
],
resolveLoader: {
modules: [
'node_modules',
],
},
}