webpack dllPlugin usage (based on vue-cli webpack template)

Because the file packaged in this example with a single entry is too large, it is divided into multiple entries. The main files involved are: /index.html, /webpack.dll.config.js, /build/webpack.base.conf.js, /build/webpack.dev.conf.js, /build/webpack.prod.conf.js new fileWebpack.dll.config.js, can be placed anywhere as long as the path is clea ...

Posted on Wed, 20 May 2020 12:25:35 -0400 by PHP_ColdFusion

Use webpack to package components and base libraries and publish them to npm

In addition to packaging applications, webpack can also be used to package js libraries and some custom component libraries. Just package js library and component library rollup Packing is also a good choice. Let's implement a simple Packaging example, which needs to meet the following functions: Package compression Version (X min.j ...

Posted on Wed, 20 May 2020 10:56:21 -0400 by Tubby

Self made scaffold

After learning the basis of Webpack, you will always be confused when you check the scaffold written by others. Later, you can check all kinds of materials on the Internet, modify them while referring to them, and complete a set of simple Scaffolding (uploaded to GiuHub and npm I have learned from Create React App (CRA) directory structure (as ...

Posted on Mon, 18 May 2020 22:56:33 -0400 by Vertical3

How to install and configure webpack?

Global install first: npm i webpack webpack-cli -g Initialize in working folder npm init -y A package.json file will appear Create a new configuration file in the working folder root, js format webpack.config.js Write in configuration file var path = require('path'); var HtmlWebpackPlugin = require('html-webpack-plugin'); //Auto import plug-i ...

Posted on Sat, 09 May 2020 12:22:56 -0400 by sottwell

Web pack compression package vue.js project lazy load quick load page

In the past, we used the command of webpack – color – progress to package the vue.js project directly. There was only one build.js file for the packaged project. It was just a common small website project, but it had 2.9MB. It was put on the Alibaba cloud server with a loan of 2 trillion. It took four or five minutes for the fir ...

Posted on Fri, 08 May 2020 10:40:02 -0400 by spags

Get data + play source through QQ music interface

Recently, I am learning to make a web mobile music player. Because I don't want to make a database to store data, I am learning to get some data from the QQ music interface If other data is normal, but can't play, you can try this I found two useful sources yesterday. I hope they can give some help to like-minded friends It's used here songmi ...

Posted on Tue, 05 May 2020 06:21:53 -0400 by 9902468

Domain name secondary directory points to nextjs application

Application scenario: considering that multiple applications can improve the SEO of a domain name, we choose to point to nextjs applications in the form of domain name secondary directory. Here, we need to modify the nginx and nextjs configurations Conditional assumption: www.helloworld.com/nextjs point to nextjs directory nextjs port 3000 p ...

Posted on Tue, 05 May 2020 05:47:26 -0400 by OLG

Basic use of Vue router developed by Vue

1, Installation 1. If you use the Vue cli scaffold to build a project, the configuration process will choose whether to use routing. If you choose Yes, the following download dependency will automatically download the Vue router. Install vue-router?  Yes 2,NPM npm install vue-router 2, Map components to routes and render Step 1 When using Vue ...

Posted on Sat, 02 May 2020 15:04:25 -0400 by mrcaraco

2. Configuration description of Web pack template of vue project

There are many configuration files under the web pack template of vue project, so we can only get familiar with them repeatedly in the actual development process, and gradually realize the rationality of official splitting and refining the configuration files. The function of the code in the main configuration fil ...

Posted on Fri, 01 May 2020 10:55:55 -0400 by Joseph07

Notes on building project configuration file with vue + webpack

var HtmlWebpackPlugin = require('html-webpack-plugin'); module.exports = { entry: './src/main.js', output: { path: './dist',// Where packed files are stored publicPath: '/dist/', // filename: '[name].bundle.[chunkhash:8].js' // This option determines the name of each output bundle. These b ...

Posted on Thu, 30 Apr 2020 13:26:59 -0400 by stc7outlaw