adding webpack.config.js

This commit is contained in:
Tieu-Philippe KHIM 2018-02-13 17:40:06 +01:00
parent 46a1f7fba1
commit f29a75a7c9

View File

@ -0,0 +1,41 @@
const webpack = require('webpack');
const path = require('path');
module.exports = {
entry: './js/app.js',
output: {
path: path.join(__dirname, 'public'),
filename: 'glances.js',
sourceMapFilename: 'glances.map.js',
},
devtool: '#source-map',
module: {
loaders: [
{
test: /\.css$/,
loader: 'style-loader!css-loader',
},
{
test: /\.(png|jpg|gif|svg|ttf|woff|woff2|eot)$/,
loader: 'url-loader',
options: {
limit: 10000,
}
},
{
test: /\.html/,
loader: 'ngtemplate-loader!html-loader'
},
{
test: require.resolve('angular'),
loader: 'exports-loader?window.angular'
},
],
},
plugins: [
new webpack.ProvidePlugin({
'angular': 'angular',
}),
]
};