Vue gzip compression suffix problem?

problem description

the project is uploaded using SVN, and if [chunkhash] is placed after the file name, it will result in multiple files, so it will be changed to "js/ [name] .js? v = [chunkhash:8]". This causes gzip to fail during compression.

the environmental background of the problems and what methods you have tried

found a lot of ways that didn"t work.
"js/ [name]. [chunkhash: 8] .js"
can be compressed successfully and modified to
"js/ [name] .js? v = [chunkhash:8]"
then compression fails (no compression)

related codes

/ / Please paste the code text below (do not replace the code with pictures)
webpack.prod.conf.js--> "js/ [name] .js? v = [chunkhash:8]".
config/index.js--> productionGzipExtensions: ["js"," css"].

"vue": "2.5.10",
"webpack": "3.10.0",

what result do you expect? What is the error message actually seen?

it is hoped that the compression will be successful in the form of "js/ [name] .js? v = [chunkhash:8]".

if you ask questions from your own point of view, if you have anything you don"t understand, communicate a lot.

Sep.18,2021

  1. after saving chunkhash data, compress the [name] .js file, and then extract chunkhash to modify the file name. You can use gulp-rev to collect chunkhash ;
  2. there is no need to upload.
Menu