vue webpack multi-page construction example code page 2/3
(4) Modify build/
Delete the original HtmlWebpackPlugin related content in the file
... // generate dist with correct asset hash for caching. // you can customize output by editing / // see /ampedandwired/html-webpack-plugin new HtmlWebpackPlugin({ filename: , template: '', inject: true, minify: { removeComments: true, collapseWhitespace: true, removeAttributeQuotes: true // more options: // /kangax/html-minifier#options-quick-reference }, // necessary to consistently work with multiple chunks via CommonsChunkPlugin chunksSortMode: 'dependency' }), ...
Add at the end of the file
var pages = ('./src/entry/*/*.html') for(var page in pages) { // Configure the generated html file, define the path, etc. var conf = { filename: page + '.html', template: pagesPrevious page123Next pageRead the full text
Related Articles
Vue implements the packaging of carousel diagram components
The packaging of Vue carousel diagram components can be implemented through packaging components, using plug-ins, configuration, etc., mainly including image preloading, timed carousel, infinite scrolling, gesture sliding, responsive layout and other functions. The implementation method can use Vue's life cycle functions, custom events, computing attributes and other technologies.2023-04-04A brief discussion on vue loading optimization strategy
This article mainly introduces a brief discussion of vue load optimization strategies. The editor thinks it is quite good. I will share it with you now and give you a reference. Let's take a look with the editor2019-03-03Regarding the caching of component information of Vue implementation
This article mainly introduces relevant information about the cache of component information of Vue implementation. Friends who need it can refer to it.2017-08-08Solve the problem of vue using the() method to initiate multiple requests on the console to report errors
This article mainly introduces the problem of solving the problem of errors reported by vue using the() method to initiate multiple requests on the console. It is of good reference value and hopes it will be helpful to everyone. Let's take a look with the editor2020-11-11How to splice route paths in vue
This article mainly introduces how to splice strings in Vue, which has good reference value. I hope it will be helpful to everyone. If there are any errors or no complete considerations, I hope you will be very encouraged.2023-12-12el-input binds keyboard keys (key modifier) in vue
This article mainly introduces the el-input binding keyboard keys (key modifiers) in vue. The example code is introduced in this article in detail, which has certain reference learning value for everyone's study or work. Friends who need it, please learn with the editor below.2020-07-07Analysis of the principle of Vue responsive system dependency collection process
When Vue is initialized, it will intercept the property getter and setter, create a dep for each value of the object and use () to store the watcher list of the property value. This article mainly introduces the analysis of the Vue responsive system dependency collection process. Friends who need it can refer to it.2022-06-06How to develop a Vue using hybrid Mixins and plug-ins
This article mainly introduces how Vue uses mixed Mixins and plug-ins to develop detailed explanations. The article introduces the sample code in detail, which has a certain reference learning value for everyone's learning or work. Friends who need it, please learn with the editor below.2020-02-02Implementation of vue+element-ui table custom column template
This article mainly introduces the implementation of the vue+element-ui table custom column template. The problem of element-ui table custom column template is perfectly solved through slots. It has certain reference value. If you are interested, you can learn about it.2024-05-05How to automatically scroll to the top when using vue-router to switch pages in vue
This article mainly introduces the implementation method of the scrollbar automatically scrolling to the top when using vue-router to switch pages in the vue project. It is generally implemented using the Window scrollTo() method. This article briefly introduces the use of crollTop. Friends who need it can refer to it.2017-11-11