Basic configuration of React project and solution of common pit
1, Create React project
# Global scaffold installation
npm install create-react-app -g --save
# Create React project
2, Implement the loading of Less file
1. Expose profile
# Expose the project's profile
npm run eject
Directory structure after profile e ...
Posted by lady_bug on Mon, 24 Feb 2020 21:24:53 -0800
build.js is mainly used to write UserScript information to the packaged JS file. The reason why BannerPlugin is not used is that if there are some special (@ = = \ n, etc.) characters in the plug-in, they will be converted to commas... When raw is set to false, it is the following, which is useless
Browser debuggin ...
Posted by FoTo50 on Tue, 28 Jan 2020 06:39:30 -0800
1. It's hard to avoid cross domain problems in front and back platform separation projects, which can be configured in devServer of webpack
target:"https://****. com "/ / address of data interface
changeOrigin:true, // Cross domain allowe ...
Posted by rkeppert on Sat, 25 Jan 2020 07:49:10 -0800
vue component classification
The reason why I wrote this article is that I interviewed dozens of people as an interviewer some time ago. One of the questions is "what are the component classifications of vue? ", it's surprising that most people only answer global components ...
Posted by CBaZ on Sun, 19 Jan 2020 20:35:58 -0800
In the last article, I mainly shared< How Webpack separates style files >css preprocessor is a program that allows you to generate css through preprocessor's own unique syntax. css preprocessing refers to that we often use some style precompiled languages in development, and then convert these pr ...
Posted by snowrhythm on Sat, 18 Jan 2020 20:05:38 -0800
# Global installation
npm install -g create-react-app
# Build a my-app Item
npx create-react-app my-app
# Tap on the key points of the blackboard, if you want to use less,Or it depends on the use webpack Configuration files, exposing webpack Profiles, using create-react-app The created projec ...
Posted by Misticx on Thu, 16 Jan 2020 02:51:06 -0800
1. Global registration instance (according to the example on the official website, the following is the code)
Posted by Vizionz on Thu, 02 Jan 2020 20:46:47 -0800
Prefixing css3 with postcss loader
Install two packages, postcss loader and autoprefixer, in the terminal
npm install –save-dev postcss-loader autoprefixer
If the installation fails, delete the node ﹣ modules folder. npm install reinstalls the folder and then reinstalls the above two packages
2. Create a postcss-con ...
Posted by pcbytes on Thu, 02 Jan 2020 01:33:37 -0800
The common methods to operate arrays are forEach, map and filter. The return values of map and filter methods are arrays, and the return values of forEach are undefined, which can be understood as no return value.
There is no concatAll method in the native array object, so I plan to implement one myself. What the concatAll metho ...
Posted by StealthRider on Thu, 26 Dec 2019 11:39:20 -0800
Recently, I received a project that requires using websocket to connect. As a result, a. Net signal came. I was responsible for processing the front end. After getting the sample js given by the back end, I started to write the connection of vue.
The main purpose is to realize that the server sends messages to the use ...
Posted by varun_146100 on Sun, 22 Dec 2019 14:23:59 -0800