Skip to content

Commit

Permalink
chore: comments
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed Mar 19, 2018
1 parent fe15344 commit 61e8c07
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ module.exports = class VueLoaderPlugin {
// replace the original vue rule with our new constructed rule.
rawRules.splice(vueRuleIndex, 1, constructedRule)

// inject global pitcher (responsible for injecting CSS post loader)
// inject global pitcher (responsible for injecting template compiler
// loader & CSS post loader)
rawRules.unshift({
loader: require.resolve('./pitch')
})
Expand Down
3 changes: 3 additions & 0 deletions lib/style-post-loader/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ const postcss = require('postcss')
const trim = require('./plugins/trim')
const scoped = require('./plugins/scoped')

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

Expand Down
4 changes: 4 additions & 0 deletions lib/template-loader/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ const transformAssetUrl = require('./modules/assetUrl')
const transformSrcset = require('./modules/srcset')
const hotReloadAPIPath = require.resolve('vue-hot-reload-api')

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

0 comments on commit 61e8c07

Please sign in to comment.