[webpack] record hmr failure solutions

preface Recently, I encountered a problem. Because the login system uses single sign on and the application uses micro front-end, the xswitch plug-in is used to intercept the agent during development, which leads to the need to manually refresh the browser and update each time the code is modified. A solution has been found. It was found that ...

Posted by ieda on Thu, 11 Nov 2021 16:38:45 -0800

II. Get / Post receiving parameters in Koa2 framework

One is to realize cross domain access 1. If the API you want to develop is called by the front-end project (such as Vue), the first step must be to realize cross domain access. The implementation of cross domain access in Koa2 framework is slightly different from that in Express. You need to install Koa2 CORS middleware to realize cross do ...

Posted by e11even on Mon, 01 Nov 2021 21:13:42 -0700

http module, node modularization, differences between exports and module.exports, package, npm

http module Concept: a module used to create a web server. Through the http.createServer() method provided by the http module, you can easily turn an ordinary computer into a web server to provide web resource services To create a Web server using the http module, you need to import it first: const http = require('http') Role of http module: 1 ...

Posted by scuff on Fri, 29 Oct 2021 06:48:04 -0700

Puppeter project practice

Reprint: https://zhuanlan.zhihu.com/p/76237595 Case1: screenshot (async () => { const browser = await puppeteer.launch(); const page = await browser.newPage(); //Set visible area size await page.setViewport({width: 1920, height: 800}); await page.goto('https://youdata.163.com'); //Screenshot of the entire page a ...

Posted by dgx on Fri, 29 Oct 2021 02:42:51 -0700

Server sent events (SSE) & EventSource client use and server basic implementation (based on Node.js)

objective The traditional Web front and back communication is mainly carried out by HTTP. Usually, the foreground actively requests to the background for what it needs, and the background cannot directly send data to the front. Usually, if the background data changes frequently, the foreground mainly depends on polling or long connection. ...

Posted by phpbeginner0120 on Mon, 25 Oct 2021 20:04:23 -0700

nodeJS express creates a server and operates on the mysql database

@[TOC] nodeJS express creates a server and operates the mysql database (personal study notes) 1, Initialization 1. Create project 1.1 create folders and initialize package management files npm init -y 1.2 installing express npm i express@4.17.1 1.3 create the app.js file in the root directory file as the entry file of the whole project ...

Posted by piyush23424 on Wed, 20 Oct 2021 14:09:54 -0700

Nearly 10000 words Vue detailed basic tutorial

catalogue 1.1 concept (based on vue2) 1.2 vue/cli scaffold 1.2.1 create project startup service 1.2.2 explanation of project directory (can be omitted) 1.2.3 custom configuration 1.2.4 eslint 1.2.5 single vue document 1.3 interpolation expression 1.4 MVVM design pattern 1.5 Vue instruction (key points, remember with a small book) 1 ...

Posted by phpyoungdeveloper on Wed, 20 Oct 2021 10:16:00 -0700

Basic concept of webpack (nanny level)

1, What is Webpack webpack itself is a third-party module package of node, which is used to package code   As can be seen from the figure, Webpack can convert various static resources js, css and less into a static file, reducing page requests.   Functions: less/sass -> css ES6/7/8 -> ES5 HTML / CSS / JS - > compact merge ...

Posted by swizenfeld on Mon, 18 Oct 2021 17:01:22 -0700

Webpack learning is in place in one step

Webpack concepts Webpack is a static module packer. When a webpack processes an application, it recursively builds a dependency graph that contains each module needed by the application, and then packages all these modules into one or more bundle s Download the webpack webpack-cli package before using (webpack-cli should be installed abov ...

Posted by LOUDMOUTH on Sun, 17 Oct 2021 10:42:25 -0700

Element UI learning notes

catalogue 1. Element UI introduction Element UI, a Vue based desktop component library for developers, designers and product managers, uses the code encapsulated by the front-end framework to help engineers develop quickly Features of element UI: Rich components The components of element UI are divided into six categories: basic compon ...

Posted by s_r_elliott on Sat, 16 Oct 2021 02:08:28 -0700