11- webpack automatically cleans up the dist directory

Because every time the build command is executed, webpack generates files in the dist directory, which leads to a rather messy directory folder. Generally, it is recommended to clean up the dist directory before each build, so only the files used will be generated. adoptclean-webpack-plugin The plug-in ...

Posted on Sat, 19 Oct 2019 12:48:03 -0700 by lucifer27

Project foundation of react

A brief introduction to react 1 Introduction to react React is a JAVASCRIPT library for building user interfaces.React is mainly used to build UI. Many people think react is V in MVC.React originated from Facebook's internal project to set up Instagram's website, which was opened in May 2013.React has a high performance, the code logic is ver ...

Posted on Fri, 18 Oct 2019 15:39:18 -0700 by cafrow

[vue] Vue uses jquery and bootstrap

Before reading this article, we should master the construction of vue project. To execute the command, switch to the project directory first. Introducing jquery Install jquery (see package.json for installation, if installed, ignore this step) $ npm install jquery --save-dev Add the following in b ...

Posted on Sat, 12 Oct 2019 11:45:02 -0700 by jeicrash

Plug-ins to be used in the project optimization process

xtravel-pc-v1 erp PC front-end project Dependent installation npm install element-ui --save With the help of babel-plugin-component, we can only introduce the required components in order to reduce the size of the project. npm install babel-plugin-component -dev npm install vuex --save Precompiled language npm install sass --save npm install cs ...

Posted on Thu, 10 Oct 2019 08:25:30 -0700 by ponsho

What is the content-type request for text/event-stream?

Recently, when learning the hot update of webpack, we found that there is a _webpack_hmr request, content-type is text/event-stream, which we haven't seen before, so learn to record it. Web pack hot updates need to push information to browsers, and websocket is usually thought of, but there is another way, called Server-Sent Events (SSE). SSE i ...

Posted on Thu, 10 Oct 2019 03:24:39 -0700 by prashanth0626

react advanced features

After using react for so long, I didn't know that react had so many advanced features. I had nothing to do during the vacation. I tried some advanced features of react. Here is the trial record. overview Characteristic characterization Usage scenarios Code segmentation Provide asynchronous components for unpacking Use when you need to opti ...

Posted on Sun, 06 Oct 2019 02:53:17 -0700 by PURU

Reverse proxy

Cross-domain: Cross-domain refers to a document or script in one domain attempting to request resources in another domain, which cannot request data based on the protection of the Same-Origin policy. Homology Policy: Same Protocol, Same Port, Same Domain Name Without homology policy, browsers are vulner ...

Posted on Wed, 02 Oct 2019 10:59:39 -0700 by dujed

How to Enjoy Developing Chrome Plugins

As a front-end developer, you probably can't live without the chrome browser, but do you have any pain points when using chrome? Have you ever thought about developing a plug-in to solve your own inconvenience?In fact, the chrome plug-in already provides a lot of useful API s, so we can develop our own plug-ins according to our own needs or int ...

Posted on Sat, 28 Sep 2019 00:11:40 -0700 by flexxall

How to write your own scaffolding - one-click initialization project

introduce Role of scaffolding: repetitive work to reduce repetitive work That is, in order to develop: compile es6, js modularization, compress code, hot update and other functions, we use packaging tools such as webpack, but it also brings new problems: the difficulty of initializing the project, complex webpack configuration, and various conf ...

Posted on Wed, 25 Sep 2019 18:16:52 -0700 by dvd420

Build a self-contained front-end scaffold from scratch

Why do we need a scaffold? For me personally, I often write demo or a new project, either copy the previous project template, or rebuild it, which is more troublesome and time-consuming, so I have a scaffold to meet my needs. The effect of scaffolding This is a basic scaffold, init a project, enter the project name, version number and other in ...

Posted on Sun, 22 Sep 2019 07:03:47 -0700 by wellscam