Add Webpack Compression plugin in prod build

This commit is contained in:
Corentin 2021-10-07 17:15:37 +09:00
commit 5e21b9d8ff
2 changed files with 10 additions and 9 deletions

View file

@ -3,7 +3,6 @@ const fs = require('fs');
const marked = require('marked');
const CopyPlugin = require('copy-webpack-plugin');
// const CompressionPlugin = require("compression-webpack-plugin")
const renderer = new marked.Renderer()
renderer.link = (href, title, text) => {
@ -144,14 +143,7 @@ module.exports = {
{from: 'assets/icons', to: 'assets/icons'},
{from: 'assets/images', to: 'assets/images'},
{from: 'assets/theme', to: 'assets/theme'}
]}),
// new CompressionPlugin(
// {
// filename: "[path].gz[query]",
// algorithm: "gzip",
// test: [/\.js/, /\.svg/],
// threshold: 1000
// })
]})
],
output:
{