Share 9 Webpack optimization strategies

introduction The packaging optimization of webpack has always been a commonplace topic, the conventional is nothing more than blocking, unpacking, compression and so on. Based on my own experience, this paper will share with you how to significantly improve the packaging speed and package volumUTF-8...

Posted by php_dave on Thu, 13 May 2021 05:29:27 +0930

Basic use of webpack

webpack.config.js packaging syntax Meaning of slash '/' In the configuration, "/" represents the url root path For example: http://localhost:8080/dist/js/test.js http://localhost:8080/ Path in node attributedescribe__dirnameReturns the absolute path of the folder where js is executed__filenameRUTF-8...

Posted by nonexist on Mon, 17 May 2021 05:45:19 +0930

webpack from introduction to mastery

begin to speak As the most popular module packaging tool for modern front-end development, webpack has become one of the necessary skills for front-end engineers. Yes: Front end resource building tools; Static module packer; webpack starts from the entry file, analyzes the dependency of the modUTF-8...

Posted by mbariou on Wed, 26 May 2021 08:04:56 +0930

JS Modularization: understanding and application of AMD modularization scheme

JS Modularization: understanding and application of AMD modularization scheme preface Today we are going to bring you the AMD modular solution in JS modular specification. JS modular standards: CommonJS, AMD, ES6 Module(ESM = ECMAScript Module) In the evolution of JavaScript, as a scripting lanUTF-8...

Posted by Restless on Tue, 08 Jun 2021 09:00:02 +0930

5, Construction speed of production environment optimization

7, Construction speed of production environment optimization 1. OneOf Function: let each rule match only one file, greatly increase the construction speed In the rules in the module, every rule will scan all the files, which will greatly increase the speed of construction, With OneOf, you can mUTF-8...

Posted by SleepyP on Sat, 19 Jun 2021 04:05:15 +0930

With the combination of Angular and Electron, the development efficiency is directly increased

The company uses Angular+Electron for PC application development, and uses the open source project angular electron as the template( https://github.com/maximegris/angular-electron )However, with the progress of the project, I was tortured by the following pain points: Using tsc to compile the cUTF-8...

Posted by LoneTraveler on Sun, 27 Jun 2021 05:25:33 +0930

Vue learning notes

1, Front section modularization 1. What is modularity When developing the back-end interface, we need to develop the controller, service and mapper. The controller injects the service and the service injects the mapper. In the back end, calls between classes become modular operations. In front-UTF-8...

Posted by westen on Fri, 09 Jul 2021 05:55:17 +0930

Basic use of webpack s

concept webpack Concepts please step through the official website loader resolves different file types Parse txt module: { rules: [ { test: /\.txt$/, use: 'raw-loader' } } Parse es6 and react jsx module: { rules: [ { test: /\.js$/, use: 'babel-loader' }, } The configuration of babel is:.babelrcUTF-8...

Posted by fimbria on Sat, 17 Jul 2021 07:25:17 +0930

How to solve cross domain problems and how to solve cross domain problems with proxy server in vuecli development environment

preface: Before that, what should we know about cross domain? And why cross domain? And cross domain basic solutions At the same time, it extends how to use proxy server to solve cross domain problems in vuecli development environment 1, Cross domain: 1. Cross domain understanding Cross domain UTF-8...

Posted by faraway on Sun, 12 Dec 2021 22:19:26 +1030

41 webpack optimization - enrich build operations

Enrich build operations For the construction of different environments, we optimize the construction of sub configuration files, which is a good solution. However, some scenarios are too weak to be configured in this way. For example, the previous configuration is to execute the construction ofUTF-8...

Posted by Paingiver on Thu, 16 Dec 2021 07:21:57 +1030