mirror of
https://github.com/typicode/json-server.git
synced 2025-07-26 11:48:20 +08:00
22 lines
621 B
JavaScript
22 lines
621 B
JavaScript
const CleanWebpackPlugin = require('clean-webpack-plugin')
|
|
const HtmlWebpackPlugin = require('html-webpack-plugin')
|
|
const MiniCssExtractPlugin = require('mini-css-extract-plugin')
|
|
|
|
module.exports = {
|
|
entry: './src/front/index.js',
|
|
module: {
|
|
rules: [
|
|
{ test: /\.css$/, use: [MiniCssExtractPlugin.loader, 'css-loader'] },
|
|
{ test: /\.js$/, exclude: /node_modules/, loader: 'babel-loader' }
|
|
]
|
|
},
|
|
plugins: [
|
|
new CleanWebpackPlugin(['dist']),
|
|
new HtmlWebpackPlugin({
|
|
favicon: 'src/front/favicon.ico',
|
|
template: 'src/front/index.html'
|
|
}),
|
|
new MiniCssExtractPlugin()
|
|
]
|
|
}
|