1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-24 20:36:40 +07:00

css hashing

This commit is contained in:
muerwre 2019-08-25 20:59:10 +07:00
parent 390fa51d0c
commit a1a790e56e
2 changed files with 12 additions and 6 deletions

View file

@ -16,7 +16,7 @@ const htmlPlugin = new HtmlWebPackPlugin({
const miniCssExractPlugin = new MiniCssExtractPlugin({
filename: '[name].css',
chunkFilename: '[id].css'
chunkFilename: '[id].css',
});
const isDevelopment = process.env.NODE_ENV !== 'production';
@ -54,7 +54,10 @@ module.exports = () => {
{
test: /\.less$/,
use: [
{ loader: isDevelopment ? 'style-loader' : MiniCssExtractPlugin.loader },
isDevelopment
? { loader: 'style-loader' }
: { loader: MiniCssExtractPlugin.loader, options: { filename: '[name].[contenthash].css' } },
// { loader: isDevelopment ? 'style-loader' : MiniCssExtractPlugin.loader },
// { loader: 'css-loader' },
{
loader: 'css-loader',