-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
30 lines (29 loc) · 932 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
const path = require('path');
const webpack = require('webpack');
module.exports = {
entry: './public/js/main.js',
output: { path: __dirname + '/public/js/bundle', filename: 'bundle.js' },
resolve: {
root: __dirname,
alias: {
Main: 'public/components/Main.jsx',
Login: 'public/components/Login.jsx',
ProfilePhotos: 'public/components/ProfilePhotos.jsx',
SavedPhotos: 'public/components/SavedPhotos.jsx',
WallPhotos: 'public/components/WallPhotos.jsx',
Gallery: 'public/components/Gallery.jsx',
NavButtons: 'public/components/NavButtons.jsx'
},
extensions: ['' , '.js' , 'jsx']
},
module: {
loaders: [{
test: /.jsx?$/,
loader: 'babel-loader',
exclude: /node_modules/,
query: {
presets: ['es2015', 'react']
}
}]
}
};