Internationalization of react project: realizing automatic assembly scheme
This scheme provides a plug-in front-end project internationalization implementation scheme, which can support internationalization without supporting internationalization at the beginning for some reasons, and then support internationalization without modifying the original business code. Make use of construction tools to achieve the internati ...
Added by lancey10 on Tue, 15 Feb 2022 08:27:00 +0200
Golden three silver four, those brain burning JS interview questions and principles
Q: Is JS code executed sequentially?
A: During the execution of JS code, it is necessary to promote variables first, and the reason why variable promotion is needed is that JS code needs to be compiled before execution
1. Variable promotion
Variable and function declarations will be stored in the variable environment, and the default v ...
Added by 9three on Wed, 09 Feb 2022 14:55:05 +0200
New generation compiler SWC
Recently, there has been a rush of trust in the front-end circle. All front-end tools that can be rewritten with trust are rewritten with trust. The tool introduced today is bable: swc, a tool that converts ES6 into ES5.Moreover, on the official website of swc, it is very straightforward to say that they are benchmarking with babel. swc and bab ...
Added by Brokenhope on Thu, 13 Jan 2022 13:23:59 +0200
webpack advanced applications: Polyfills
Polyfills
npm install --save @babel/polyfill
Then, import it into our main bundle file:
import '@babel/polyfill'
console.log(Array.from([1, 2, 3], x => x + x))
Note that this approach gives priority to correctness rather than bundle size. In order to be safe and reliable, polyfill/shim must run before all other codes and need to be loa ...
Added by djdaz on Sun, 19 Dec 2021 22:37:59 +0200