Skip to content

Bump loader-utils and use getOptions #15

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Dec 20, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ module.exports = function (content) {
// var isServer = this.options.target === 'node'
// var isServer = false
var loaderContext = this
var query = loaderUtils.parseQuery(this.query)
var query = loaderUtils.getOptions(this)
var params = loaderUtils.parseQuery(this.resourceQuery)
var options = this.options.__vueOptions__ = Object.assign({}, this.options.vue, this.vue, query)
var filePath = this.resourcePath
Expand Down
2 changes: 1 addition & 1 deletion lib/selector.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ var loaderUtils = require('loader-utils')

module.exports = function (content) {
this.cacheable()
var query = loaderUtils.parseQuery(this.query)
var query = loaderUtils.getOptions(this)
var filename = path.basename(this.resourcePath)
var parts = parse(content, filename, this.sourceMap)
var part = parts[query.type]
Expand Down
2 changes: 1 addition & 1 deletion lib/style-rewriter.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ module.exports = function (css, map) {
this.cacheable()
var cb = this.async()

loaderUtils.parseQuery(this.query)
loaderUtils.getOptions(this)
var options = this.options.__vueOptions__
var postcssOptions = options.postcss

Expand Down
2 changes: 1 addition & 1 deletion lib/template-compiler.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ var beautify = require('js-beautify').js_beautify
module.exports = function (html) {
this.cacheable()
var isProduction = this.minimize || process.env.NODE_ENV === 'production'
var query = loaderUtils.parseQuery(this.query)
var query = loaderUtils.getOptions(this)
// var isServer = this.options.target === 'node'
// var isServer = false
var vueOptions = this.options.__vueOptions__
Expand Down
2 changes: 1 addition & 1 deletion lib/template-loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ var extname = require('path').extname
module.exports = function (content) {
this.cacheable && this.cacheable()
var callback = this.async()
var opt = loaderUtils.parseQuery(this.query)
var opt = loaderUtils.getOptions(this)
var vue = this.options.__vueOptions__
if (vue && vue.template) {
for (var key in vue.template) {
Expand Down
Loading