diff --git a/.gitignore b/.gitignore index 7749b0a6c..907ea8e9a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,8 @@ +.idea .DS_Store exploration node_modules *.log example/dist docs/.vuepress/dist -test/.cache \ No newline at end of file +test/.cache diff --git a/CHANGELOG.md b/CHANGELOG.md index e1c0e0279..032e0e047 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,14 @@ + +## [15.7.2](https://github.com/vuejs/vue-loader/compare/v15.7.1...v15.7.2) (2019-11-02) + + +### Bug Fixes + +* add cache-loader to optional peer dependency ([e9d8b71](https://github.com/vuejs/vue-loader/commit/e9d8b71)) +* use `require.resolve` when referencing `cache-loader` ([#1585](https://github.com/vuejs/vue-loader/issues/1585)) ([d3fa467](https://github.com/vuejs/vue-loader/commit/d3fa467)) + + + ## [15.7.1](https://github.com/vuejs/vue-loader/compare/v15.7.0...v15.7.1) (2019-07-18) diff --git a/README.md b/README.md index 5828ac012..a840bdf68 100644 --- a/README.md +++ b/README.md @@ -42,3 +42,79 @@ There are many cool features provided by `vue-loader`: - State-preserving hot-reloading during development. In a nutshell, the combination of webpack and `vue-loader` gives you a modern, flexible and extremely powerful front-end workflow for authoring Vue.js applications. + +## How It Works + +> The following section is for maintainers and contributors who are interested in the internal implementation details of `vue-loader`, and is **not** required knowledge for end users. + +`vue-loader` is not a simple source transform loader. It handles each language blocks inside an SFC with its own dedicated loader chain (you can think of each block as a "virtual module"), and finally assembles the blocks together into the final module. Here's a brief overview of how the whole thing works: + +1. `vue-loader` parses the SFC source code into an *SFC Descriptor* using `@vue/component-compiler-utils`. It then generates an import for each language block so the actual returned module code looks like this: + + ``` js + // code returned from the main loader for 'source.vue' + + // import the