From 3cfb27e113c31768adf2e18c26777c6e624b6ed3 Mon Sep 17 00:00:00 2001 From: kazuya kawaguchi Date: Mon, 6 Jun 2016 23:06:50 +0900 Subject: [PATCH 1/8] add license section (#250) --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index fab68c12c..a4178a27d 100644 --- a/README.md +++ b/README.md @@ -12,3 +12,7 @@ There are also some example projects: - [vue-loader-example](https://github.com/vuejs/vue-loader-example/) - [vue-hackernews](https://github.com/vuejs/vue-hackernews) + +## License + +[MIT](http://opensource.org/licenses/MIT) From 322cf4df3035c7af96ec9be546e92cdf56f6ec8f Mon Sep 17 00:00:00 2001 From: Eden Date: Thu, 16 Jun 2016 11:42:34 +0800 Subject: [PATCH 2/8] shold emit webpack Error rather than throwing (#256) * shold emit webpack Error rather than throwing * just callback can emit the error * should return --- lib/template-loader.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/template-loader.js b/lib/template-loader.js index af3d6e083..fe7461719 100644 --- a/lib/template-loader.js +++ b/lib/template-loader.js @@ -27,10 +27,10 @@ module.exports = function (content) { } if (!cons[opt.engine]) { - throw new Error( + return callback(new Error( 'Template engine \'' + opt.engine + '\' ' + 'isn\'t available in Consolidate.js' - ) + )) } // for relative includes @@ -38,8 +38,9 @@ module.exports = function (content) { cons[opt.engine].render(content, opt, function (err, html) { if (err) { - throw err + callback(err) + } else { + exportContent(html) } - exportContent(html) }) } From 57d6d7d0cd60ecc03750810c14b9a15cdae5a7f0 Mon Sep 17 00:00:00 2001 From: Evan You Date: Wed, 22 Jun 2016 12:13:27 -0400 Subject: [PATCH 3/8] fix hot-reload for vue files with the same name --- lib/loader.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/loader.js b/lib/loader.js index c2e2644e7..f6e479a53 100644 --- a/lib/loader.js +++ b/lib/loader.js @@ -214,13 +214,14 @@ module.exports = function (content) { process.env.NODE_ENV !== 'production' && (parts.script.length || parts.template.length) ) { + var hotId = JSON.stringify(moduleId + '/' + fileName) output += 'if (module.hot) {(function () {' + ' module.hot.accept()\n' + ' var hotAPI = require("vue-hot-reload-api")\n' + ' hotAPI.install(require("vue"), false)\n' + ' if (!hotAPI.compatible) return\n' + - ' var id = ' + loaderUtils.stringifyRequest(loaderContext, filePath) + '\n' + + ' var id = ' + hotId + '\n' + ' if (!module.hot.data) {\n' + // initial insert ' hotAPI.createRecord(id, module.exports)\n' + From 46206855ba66c32fb0e5288986916b2775893ed6 Mon Sep 17 00:00:00 2001 From: Evan You Date: Wed, 22 Jun 2016 12:16:06 -0400 Subject: [PATCH 4/8] 8.5.3 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 0b6f80bea..b58c0e7c7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "vue-loader", - "version": "8.5.2", + "version": "8.5.3", "description": "Vue.js component loader for Webpack", "main": "index.js", "repository": { From e4230fd465a0112fca08b560fdfb5616d4317b80 Mon Sep 17 00:00:00 2001 From: Ryan Dobbs Date: Tue, 28 Jun 2016 15:10:21 -0600 Subject: [PATCH 5/8] Update README.md (#270) --- docs/en/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/en/README.md b/docs/en/README.md index 5831686d9..ed8da0183 100644 --- a/docs/en/README.md +++ b/docs/en/README.md @@ -31,7 +31,7 @@ But Webpack can do more than that. With "loaders", we can teach Webpack to trans - Transpile ES2015, CoffeeScript or TypeScript modules into plain ES5 CommonJS modules; - Optionally you can pipe the source code through a linter before doing the compilation; - Transpile Jade templates into plain HTML and inline it as a JavaScript string; -- Transpile SASS files into plain CSS, then convert it into a JavaScript snippet that insert the resulting CSS as a `