-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathwebpack.config.babel.js
More file actions
executable file
·48 lines (46 loc) · 1.11 KB
/
webpack.config.babel.js
File metadata and controls
executable file
·48 lines (46 loc) · 1.11 KB
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
import webpack from 'webpack';
import path from 'path';
const config = {
devtool: 'source-map',
entry: './client/src/app',
output: {
path: path.join(__dirname, 'public/dist'),
filename: 'bundle.js'
},
node: {
__dirname: true,
},
plugins: [new webpack.DefinePlugin({ "global.GENTLY": false })],
externals: {
'cheerio': 'window',
'react/lib/ExecutionEnvironment': true,
'react/lib/ReactContext': true,
},
module: {
rules: [
{
test: /\.scss$/,
include: path.join(__dirname, 'public/stylesheets'),
loaders: ["style-loader", "css-loader", "sass-loader"]
},
{
test: /\.(js|jsx)$/,
include: path.join(__dirname, 'client/src'),
exclude: ['node_modules'],
use: [
{ loader: 'babel-loader',
options: {
presets: ['react', 'es2015']
}
}
]
},
{
test: /\.(jpe?g|gif|png)$/,
include: path.join(__dirname, 'public'),
loader: 'file-loader?emitFile=false&name=[path][name].[ext]'
}
]
}
};
export default config;