forked from UbuntuEvangelist/simplevoip
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
80 lines (79 loc) · 1.82 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
/* global __dirname, module, require */
const webpack = require('webpack');
module.exports = {
plugins: [
new webpack.ProvidePlugin({
$: 'jquery',
jQuery: 'jquery',
_: 'lodash',
}),
// new webpack.optimize.UglifyJsPlugin(), // uncomment this property to enable minimization
],
entry: {
app: ['babel-polyfill', './public/app/app.js'],
},
output: {
path: __dirname + '/public/dist/',
publicPath: '/public/dist/',
filename: 'bundle.js',
},
module: {
loaders: [
{
test: /.js$/,
loader: 'babel-loader',
query: {
presets: ['env'],
},
exclude: /(node_modules|lib|server|test|migrations|seeds)/,
},
{
test: /\.css$/,
loaders: ['style-loader', 'css-loader'],
},
{
test: /\.scss$/,
loaders: ['style', 'css', 'postcss', 'sass'],
exclude: /node_modules/,
},
{
test: /\.(ttf|eot|svg|gif|png|woff(2)?)(\?[a-z0-9=&.]+)?$/,
loader: 'file-loader',
},
{
test: /\.woff(2)?(\?v=[0-9]\.[0-9]\.[0-9])?$/, // https://www.npmjs.com/package/font-awesome-webpack#usage
loader: 'url-loader?limit=10000&mimetype=application/font-woff',
},
{
test: /\.html$/,
loader: 'html-loader',
exclude: /node_modules/,
},
{
test: require.resolve('jquery'),
loader: 'expose-loader?$!expose-loader?jQuery',
},
],
},
node: {
'fs': 'empty',
'net': 'empty',
'tls': 'empty',
'dns': 'empty',
'boom': 'empty',
'hapi': 'empty',
'inert': 'empty',
'joi': 'empty',
'knex': 'empty',
'mysql': 'empty',
'hapi-auth-jwt': 'empty',
},
resolve: {
alias: {},
extensions: ['.js', '.json'],
modules: [
'node_modules',
'lib',
],
},
};