This repository has been archived by the owner on Apr 13, 2024. It is now read-only.
forked from Coronelcortez/arma-server-web-admin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
54 lines (46 loc) · 1.7 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
var path = require('path')
var webpack = require('webpack')
module.exports = {
// Entry point for static analyzer
entry: path.join(__dirname, 'public', 'js', 'app.js'),
output: {
// Where to build results
path: path.join(__dirname, 'assets'),
// Filename to use in HTML
filename: 'bundle.js',
// Path to use in HTML
publicPath: '/'
},
resolve: {
alias: {
app: path.join(__dirname, 'public', 'js', 'app'),
marionette: 'backbone.marionette',
'sweet-alert': 'sweetalert',
tpl: path.join(__dirname, 'public', 'js', 'tpl')
}
},
plugins: [
new webpack.ProvidePlugin({
_: 'underscore',
$: 'jquery',
Backbone: 'backbone',
jQuery: 'jquery'
})
],
module: {
loaders: [
{ test: /\.css$/, loaders: ['style-loader', 'css-loader'] },
{ test: /\.html$/, loaders: ['raw-loader'] },
{ test: /\.json$/, loaders: ['json-loader'] },
{ test: /\.png$/, loader: 'url-loader?limit=8192&mimetype=image/png' },
{ test: /\.jpe?g$/, loader: 'url-loader?limit=8192&mimetype=image/jpg' },
{ test: /\.gif$/, loader: 'url-loader?limit=8192&mimetype=image/gif' },
{ test: /\.svg(\?v=\d+\.\d+\.\d+)?$/, loader: 'url-loader?limit=8192&mimetype=image/svg+xml' },
{ test: /\.woff2(\?v=\d+\.\d+\.\d+)?$/, loader: 'url-loader?limit=8192&mimetype=application/font-woff2' },
{ test: /\.woff(\?v=\d+\.\d+\.\d+)?$/, loader: 'url-loader?limit=8192&mimetype=application/font-woff' },
{ test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/, loader: 'url-loader?limit=8192&mimetype=application/octet-stream' },
{ test: /\.eot(\?v=\d+\.\d+\.\d+)?$/, loader: 'file-loader' }
]
},
devtool: '#inline-source-map'
}