Skip to content

Commit 61e8c07

Browse files
committed
chore: comments
1 parent fe15344 commit 61e8c07

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

lib/plugin.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ module.exports = class VueLoaderPlugin {
4646
// replace the original vue rule with our new constructed rule.
4747
rawRules.splice(vueRuleIndex, 1, constructedRule)
4848

49-
// inject global pitcher (responsible for injecting CSS post loader)
49+
// inject global pitcher (responsible for injecting template compiler
50+
// loader & CSS post loader)
5051
rawRules.unshift({
5152
loader: require.resolve('./pitch')
5253
})

lib/style-post-loader/index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ const postcss = require('postcss')
33
const trim = require('./plugins/trim')
44
const scoped = require('./plugins/scoped')
55

6+
// This is a post loader that handles scoped CSS transforms.
7+
// Injected right before css-loader by the global pitcher (../pitch.js)
8+
// for any <style scoped> selection requests initiated from within vue files.
69
module.exports = function (source, map) {
710
const cb = this.async()
811

lib/template-loader/index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ const transformAssetUrl = require('./modules/assetUrl')
88
const transformSrcset = require('./modules/srcset')
99
const hotReloadAPIPath = require.resolve('vue-hot-reload-api')
1010

11+
// Loader that compiles raw template into JavaScript functions.
12+
// This is injected by the global pitcher (../pitch) for template
13+
// selection requests initiated from vue files.
14+
// Also handles lang="xxx" pre-processing via consolidate if necessary.
1115
module.exports = function (template) {
1216
const loaderContext = this
1317
const query = qs.parse(this.resourceQuery.slice(1))

0 commit comments

Comments
 (0)