safe-bike-routing/webpack.config.js
2020-08-13 01:32:35 +02:00

41 lines
739 B
JavaScript

const path = require('path');
module.exports = {
mode: 'production',
entry: './src/main.js',
output: {
filename: 'bundle.js',
path: path.resolve(__dirname, 'dist'),
},
module: {
rules: [
{
test: /\.css$/i,
use: ['style-loader', 'css-loader'],
},
{
test: /\.(png|svg|jpg|gif)$/i,
use: {
loader: 'url-loader',
options: {
name: './dist/images/icon/[name].[ext]'
}
}
},
{
test: /\.(eot|woff|woff2|ttf)$/i,
use: {
loader: 'url-loader',
options: {
name: './dist/webfonts/[name].[ext]'
}
}
}
],
},
devServer: {
contentBase: __dirname + '/dist',
publicPath: '/',
watchContentBase: true,
open: true
}
};