Newer
Older
piotr.kupczyk@id.ethz.ch
committed
const HtmlWebpackPlugin = require('html-webpack-plugin')
module.exports = {
entry: './src/index.js',
output: {
path: __dirname + '/build/',
filename: 'bundle.[hash].js'
},
piotr.kupczyk@id.ethz.ch
committed
mode: 'production',
module: {
rules: [
{
test: /\.(js|jsx)$/,
exclude: /node_modules/,
use: {
piotr.kupczyk@id.ethz.ch
committed
loader: 'babel-loader'
piotr.kupczyk@id.ethz.ch
committed
use: ['style-loader', 'css-loader']
},
{
test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,
loader: 'url-loader',
options: {
limit: 10000
}
}
]
},
plugins: [
new HtmlWebpackPlugin({
inject: 'body',
filename: './index.html',
template: './index.html'
})
]