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:
parent
390fa51d0c
commit
a1a790e56e
2 changed files with 12 additions and 6 deletions
|
@ -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',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue