vue-loader
Advanced tools
Comparing version 1.1.4 to 1.1.5
18
index.js
@@ -6,8 +6,20 @@ var compiler = require('vue-component-compiler') | ||
module.exports = function(content) { | ||
this.cacheable && this.cacheable() | ||
var cb = this.async() | ||
compiler.compile(content, this.resourcePath, function(err, result) { | ||
var ctx = this | ||
var cb = ctx.async() | ||
ctx.cacheable && ctx.cacheable() | ||
var deps = {} | ||
compiler.on('dependency', addDep) | ||
function addDep (filePath) { | ||
if (!deps[filePath]) { | ||
deps[filePath] = true | ||
ctx.addDependency(filePath) | ||
} | ||
} | ||
compiler.compile(content, ctx.resourcePath, function(err, result) { | ||
if(err) return cb(err) | ||
compiler.removeListener('dependency', addDep) | ||
cb(null, result) | ||
}) | ||
} |
{ | ||
"name": "vue-loader", | ||
"version": "1.1.4", | ||
"version": "1.1.5", | ||
"description": "Webpack loader for single-file Vue components", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -50,3 +50,3 @@ # vue-loader | ||
And you can import using the `src` attribute (note you'll have to save the vue file to trigger a rebuild since the imported file is not tracked by Browserify as a dependency): | ||
And you can import using the `src` attribute (note you'll have to save the vue file to trigger a rebuild since the imported file is not tracked by Webpack as a dependency): | ||
@@ -53,0 +53,0 @@ ``` html |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
3875
20
0