How to configure:
NPM I compression webpack plugin - d
install the plug-in and add the following configuration in Vue.Config.JS
(the compression plugin configuration options depend on your personal needs)
configureWebpack: {
plugins: [
new CompressionPlugin({
test: /\.(js|css)?$/i, // Which files to compress
algorithm:'gzip', // Use gzip compression
})
]
}
Problems:
usegzip
to unzip the Vue project report an error:Error: Rule can only have one resource source (provided resource and test + include + exclude).
Cause Analysis:
Webpack version conflict in package.json
Solution:
npm i [email protected] -D
npm i [email protected] [email protected] -D
Read More:
- [Solved] Vue Project Error: Error: Cannot find module ‘webpack‘ Require stack以及Error: Rule can only have one resource so
- Error: Rule can only have one resource source (provided resource and test + include + exclude)
- [Solved] Error Rule can only have one resource source (provided resource and test + include + exclude)
- [Solved] Error Rule can only have one resource source (provided resource and test + include + exclude)
- [Solved] Vue Error: Error: Rule can only have one resource source (provided resource and test + include + ex
- npm ERR code ELIFECYCLE [How to Solve]
- [Solved] Install The Latest Version of Jest Error: TypeError: Cannot read property ‘instrument‘ of undefined
- Vue Install less Error: While resolving: [email protected]
- [Solved] Error: Transform failed with 1 error: error: Invalid option in transform() call: “jsx“
- Solution to build error in Vue project (error in static/JS)/vendor.xxxxx.js from UglifyJs)
- Cannot read property ‘isFile‘ of undefined [How to Solve]
- OTS parsing error: invalid version tag [How to Solve]
- How to Solve VUE Error: Mixed spaces and tabs
- [Solved] AES encryption in ie11 results in an error (missing ‘)‘
- [Solved] Vue eslint Error: Component name “*****“ should always be multi-word
- When starting Vue project: cannot find module ‘webpack cli/bin/config yargs’ error resolution
- [Solved] Vue Start Project Error: ValidationError: webpack Dev Server Invalid Options
- ‘webpack dev server’ is not an internal or external command, nor is it a runnable program or batch file. Solution: error in cnpm run dev:
- “Failed to load resource: net::ERR_FILE_NOT_FOUND” error. The project created by vue-cli 3.0 can run under dev, and an error is reported after packaging, and the page is blank.
- [Solved] VS Code Error: Vetur can‘t find ‘tsconfig.json‘ or ‘jsconfig.json‘