Peter Stuifzand
e9f9c59714
All checks were successful
continuous-integration/drone/push Build is passing
46 lines
1.0 KiB
JavaScript
46 lines
1.0 KiB
JavaScript
const path = require('path');
|
|
|
|
const {CleanWebpackPlugin} = require('clean-webpack-plugin');
|
|
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
|
|
|
|
module.exports = {
|
|
mode: 'development',
|
|
entry: {
|
|
index: './src/index.js'
|
|
},
|
|
output: {
|
|
filename: '[name].bundle.js',
|
|
path: path.resolve(__dirname, '../dist')
|
|
},
|
|
|
|
module: {
|
|
rules: [
|
|
{
|
|
test: /\.s?css$/,
|
|
use: [MiniCssExtractPlugin.loader, 'css-loader', 'sass-loader']
|
|
},
|
|
{
|
|
test: /\.(woff|woff2|eot|ttf|otf)$/,
|
|
loader: "file-loader",
|
|
options: {
|
|
name: '[name].[ext]',
|
|
outputPath: 'font/'
|
|
}
|
|
}
|
|
]
|
|
},
|
|
|
|
plugins: [
|
|
new CleanWebpackPlugin(),
|
|
new MiniCssExtractPlugin({
|
|
filename: '[name].css',
|
|
chunkFilename: "[id].css"
|
|
}),
|
|
],
|
|
|
|
devServer: {
|
|
contentBase: './dist',
|
|
hot: true
|
|
},
|
|
};
|