-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathwebpack.config.js
More file actions
31 lines (30 loc) · 806 Bytes
/
webpack.config.js
File metadata and controls
31 lines (30 loc) · 806 Bytes
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
const path = require('path');
module.exports = {
entry: './browser/index.jsx', // the starting point for our program
output: {
path: path.join(__dirname, '/public'), // absolute path for the directory where we want the output to be placed
filename: 'bundle.js',
},
context: __dirname,
devtool: 'source-map',
resolve: {
extensions: ['.js', '.jsx', '.scss'],
},
module: {
loaders: [
{
test: /jsx?$/,
exclude: /(node_modules|bower_components)/,
loader: 'babel-loader',
query: {
presets: ['react', 'es2015', 'stage-2'],
},
},
{ test: /\.scss?$/, loaders: ['style', 'css', 'sass'] },
{
test: /\.(png|jpg|jpeg|gif|svg|woff|woff2|ttf|eot)(\?.*$|$)/,
loader: 'file',
},
],
},
};