2017-10-06 11:20:06 +00:00
|
|
|
var path = require('path')
|
|
|
|
var webpack = require('webpack')
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
// Entry point for static analyzer
|
2018-10-08 21:07:46 +00:00
|
|
|
entry: path.join(__dirname, 'public', 'js', 'app.js'),
|
2017-10-06 11:20:06 +00:00
|
|
|
|
|
|
|
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',
|
2018-08-18 03:23:06 +00:00
|
|
|
tpl: path.join(__dirname, 'public', 'js', 'tpl')
|
2017-10-06 11:20:06 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
plugins: [
|
|
|
|
new webpack.ProvidePlugin({
|
|
|
|
_: 'underscore',
|
|
|
|
$: 'jquery',
|
|
|
|
Backbone: 'backbone',
|
|
|
|
jQuery: 'jquery'
|
|
|
|
})
|
|
|
|
],
|
|
|
|
|
|
|
|
module: {
|
|
|
|
loaders: [
|
2018-12-15 13:27:07 +00:00
|
|
|
{ test: /\.css$/, loaders: ['style-loader', 'css-loader'] },
|
2019-09-22 21:02:31 +00:00
|
|
|
{ test: /\.html$/, loaders: ['raw-loader'] },
|
2018-12-15 13:27:07 +00:00
|
|
|
{ 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' }
|
2017-10-06 11:20:06 +00:00
|
|
|
]
|
|
|
|
},
|
|
|
|
|
|
|
|
devtool: '#inline-source-map'
|
|
|
|
}
|