when you don"t use routing lazy loading, the packaged vendor.js is a bit big. Now, after using routing lazy loading, there is a js file that prompts you to be a bit big
.
:
when you don"t use routing lazy loading, the packaged vendor.js is a bit big. Now, after using routing lazy loading, there is a js file that prompts you to be a bit big
.
:
Let's have a look at the package with a plug-in.
const BundleAnalyzer = require('webpack-bundle-analyzer')
plugins: [
new BundleAnalyzer.BundleAnalyzerPlugin()
]
see if vendor is packed again in 0.js, if there is anything common to extract, and supplement the configuration of webpack. If it is a simple vue component, there is no way to do it without other module,.
< hr >Webpack configuration details (including 4)-- pay attention to details
you can delete the map file when packaging, thus reducing the file size and increasing the compilation speed
/ config/index.js:productionSourceMap: true, modify to false
Delete the node_modules folder
Previous: Guards in vue components do not trigger
Next: Why is the html of vue pre-rendering unconfigured routing rendering on the front page?
...
webpack.config.js: var webpack = require( webpack ); var path = require("path"); module.exports = { entry: . src app.js , output: { path: path.resolve(__dirname, . bin ), filename: app.bundle.js ...
I just updated the related dependencies of my project build : how should this situation be solved ...
how to use the environment variables on the linux service in the configuration file, ...
as shown in the picture, the following error is reported when packing, the reason is unknown! ERROR in static js vendor.c6cf6d8258be562986f2.js from UglifyJs ...
I added demo and reported an error. If you remove it, it s all right . do not allow other things to be added. If you add something, you will report an error . did you encounter this situation again? ...
is the path wrong? solved: because the image path is wrong ...
I have a total of five pages, using asynchronous route loading, the last four ways are as follows, so that each routing page is loaded on demand, so as not to load too slowly on the first screen. devstyle npm run buildwebpackvuecssimportcssindexcss ...
there is no effect after clicking, the console does not respond, and the click event does not take effect. Code section: .list(v-for="(i,n) in lists" :key="n" @click="change(i.url)") {{i.name}} corresponding event: cha...
var webpack = require ( webpack ); var HtmlWebpackPlugin = require ( html-webpack-plugin ); const ExtractTextPlugin = require ( extract-text-webpack-plugin ); module.exports = { entry: __dirname + " src main.js", output: { pat...
when referencing popper.js, if packaging does not rule out popper.js, calling new PopperJS, an error will be reported let PopperJS = require( . popper ); let popper = new PopperJS(); PopperJS is not a constructor webpack.base.conf.js: ...
this is what happens when my vue project is packaged with build and processed with tarantula is there any solution the packaged page of ps: can run normally, and the path is loaded correctly ...
Hello, seniors. I bought a CVM in Aliyun. I want to throw my packaged vue project on it and use the public network to access it. I can access it normally when I configure nginx, on my own window computer! But throwing it into the server of the linux sys...
eslint is installed globally and locally, and the project is generated with vue-cil. After entering the eslint fiel-- fix command, no error is reported, and the file is not repaired....
I refer to the picture in the style tag in the .vue file template style webpack where assetsPath ( images [name]. [hash: 7]. [ext] ) is static images [name]. [hash: 7]. [ext] ...
display the following error message Module build failed: TypeError: Cannot read property transforms of null at Object.module.exports ( Users linhang node_modules buble-loader index.js:18:47) this problem occurs even if initialized directly wit...
at present, a background management system has been developed. If you want to type a function module (there will be many pages and components) into a single js file, and then use the typed js file for development, such as routing to the function page, wh...
I want to introduce a complete js file into a vue file. So I don t think it s appropriate to use import to introduce all the content at once. then I tried two more methods (I don t know if there is one) 1. < script src= "type= " text javascript ...
http: test.web.yooyii.com ...
webpack.base.config.js: entry: { app: . src index.js }, output: { path: config.build.assetsRoot, publicPath: config.dev.assetsPublicPath, static filename: [name].bundle.js , ...