forked from GrayMatterLab/carousal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
39 lines (38 loc) · 897 Bytes
/
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
var path = require('path');
var SRC_DIR = path.join(__dirname, '/client/src');
var DIST_DIR = path.join(__dirname, '/client/public');
module.exports = {
entry: `${SRC_DIR}/app.jsx`,
output: {
filename: 'bundle.js',
path: DIST_DIR
},
module : {
rules : [
{
test : /\.js|\.jsx$/,
include : SRC_DIR,
loader : 'babel-loader',
query: {
presets: ['@babel/preset-env', '@babel/preset-react']
}
},
{
test: /\.css$/,
use: [
{loader: 'style-loader'},
{loader: 'css-loader',},
]
},
{
test: /\.(jpe?g|png|gif|woff|woff2|eot|ttf|svg)(\?[a-z0-9=.]+)?$/,
loader: 'url-loader?limit=100000'
}
]
},
output: {
filename: 'bundle.js',
path: path.resolve(__dirname, 'client/public'),
},
resolve: { extensions: ['.js', '.jsx'] },
};