Fool learning web pack (5) - Extraction of css and automatic introduction of html into js/css

First, based on the previous four articles, we use webpack to extract css. You need to install a plug-in here. Before installing, first of all, it should be explained that if there is no fourth article as the premise, that is, if the picture is not processed, it will not be able to parse the url in CSS when extracting css, so before extracting, ...

Posted by Kilgore Trout on Wed, 09 Jan 2019 16:57:10 -0800

29 - Analysis of Resolver.prototype.resolve of webpack source code

In the previous section, we finally returned a resolver, essentially a Resolver object: resolver = new Resolver(fileSystem); The constructor of this object is very simple. It simply inherits Tapable and receives the fileSystem parameter: function Resolver(fileSystem) { Tapable.call(this); this.fileSystem = fileSystem; } module.export ...

Posted by hubbardude on Tue, 08 Jan 2019 16:33:09 -0800

Vue-SSR Series (1) vue2.0+node+express+webpack to realize vue-ssr server rendering of single-page Application small demo

First, what is server-side rendering (SSR)? Roughly speaking, the server splices the static pages requested by users and returns them directly to the client. The client activates these static pages to make them dynamic and responsive to subsequent data changes. Second, why use server-side rendering (SSR)? 1. Better SEO, because sea ...

Posted by kcomer on Wed, 26 Dec 2018 14:18:06 -0800

21 - A Brief Analysis of Compoile Process-Event Flow This-Compoilation of Web Pack Source Code

After generating the Compilation instance in the previous section, some attributes are added, and then the flow of this-compilation events is triggered, as follows: Compiler.prototype.newCompilation = (params) => { // new Compilation() const compilation = this.createCompilation(); compilation.fileTimestamps = this.fileTimestamps ...

Posted by wmolina on Tue, 18 Dec 2018 19:39:04 -0800

Writing Difference between Single File Application and Multi-File Application of webpack.config.js Based on vue+webpack

1. Preface In recent days, some people have asked similar questions, that is, how to change the configuration of single-page applications to multi-file applications, or how to change the configuration of multi-file applications to single-file applications when building directories with vue and webpack. This situation, I have dealt with before, ...

Posted by phppssh on Sat, 15 Dec 2018 09:54:04 -0800