forked from q-dot/q-dot
-
Notifications
You must be signed in to change notification settings - Fork 4
/
webpack.config.js
46 lines (44 loc) · 1.28 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
//import path module to resolve filepaths
const path = require('path');
const webpack = require('webpack');
const config = {
entry: {
//if you have a new entry point for a new page, add it here
customerApp: path.resolve(__dirname, 'client/src/customerIndex.jsx'),
customerLogin: path.resolve(__dirname, 'client/src/customerLoginIndex.jsx'),
customerSignup: path.resolve(__dirname, 'client/src/customerSignupIndex.jsx'),
queueinfo: path.resolve(__dirname, 'client/src/queueinfoIndex.jsx'),
managerApp: path.resolve(__dirname, 'client/src/managerIndex.jsx'),
managerLogin: path.resolve(__dirname, 'client/src/managerLoginIndex.jsx')
},
output: {
path: path.resolve(__dirname, 'client/dist/js'),
filename: '[name]-bundle.js',
publicPath: '../js'
},
module: {
loaders: [
{
test: /\.jsx$/,
loader: 'babel-loader',
exclude: /node_modules/
},
{
test: /\.css$/,
loader: 'style-loader!css-loader'
},
{
test: /\.(png|jpg|gif|svg|eot|ttf|woff|woff2)$/,
loader: 'file-loader?name=/assets/[name].[ext]'
}
],
},
plugins: [
new webpack.ProvidePlugin({
$: 'jquery',
jQuery: 'jquery',
bootstrap: 'bootstrap'
})
]
};
module.exports = config;