From 7c1d6e033238d4a89b758671e90218f69d24a5a7 Mon Sep 17 00:00:00 2001 From: Evan You Date: Wed, 31 Jan 2018 02:39:13 -0500 Subject: [PATCH 01/16] ci: use node 6 --- circle.yml | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 circle.yml diff --git a/circle.yml b/circle.yml new file mode 100644 index 00000000..b00026e2 --- /dev/null +++ b/circle.yml @@ -0,0 +1,3 @@ +machine: + node: + version: 6 From bcca0b29b9d756ba92ac180e00fb09de52584c5b Mon Sep 17 00:00:00 2001 From: EGOIST <0x142857@gmail.com> Date: Wed, 14 Feb 2018 02:23:54 +0800 Subject: [PATCH 02/16] Fix require for es module (#20) --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 0bcb0f55..5fdb08b7 100644 --- a/index.js +++ b/index.js @@ -87,7 +87,7 @@ module.exports.pitch = function (remainingRequest) { } else { // normal import return shared.concat([ - 'require(' + addStylesServerPath + ')(' + id + ', content, ' + isProduction + ')' + 'require(' + addStylesServerPath + ').default(' + id + ', content, ' + isProduction + ')' ]).join('\n') } } From 7a9f3f8861e25984ab4aa898c02fddc9a1c8328e Mon Sep 17 00:00:00 2001 From: Evan You Date: Tue, 13 Feb 2018 13:24:02 -0500 Subject: [PATCH 03/16] 4.0.2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b61442bf..e05dcf84 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "vue-style-loader", - "version": "4.0.1", + "version": "4.0.2", "author": "Evan You", "description": "Vue.js style loader module for webpack", "repository": { From 0c7ee9dff6cd44c2b204b45dfdaba4eda12fbe6b Mon Sep 17 00:00:00 2001 From: Evan You Date: Tue, 20 Mar 2018 16:03:46 -0400 Subject: [PATCH 04/16] feat: support vue-loader 15 --- index.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index 5fdb08b7..447bce42 100644 --- a/index.js +++ b/index.js @@ -6,12 +6,11 @@ var loaderUtils = require('loader-utils') var path = require('path') var hash = require('hash-sum') +var qs = require('querystring') module.exports = function () {} module.exports.pitch = function (remainingRequest) { - if (this.cacheable) this.cacheable() - var isServer = this.target === 'node' var isProduction = this.minimize || process.env.NODE_ENV === 'production' var addStylesClientPath = loaderUtils.stringifyRequest(this, '!' + path.join(__dirname, 'lib/addStylesClient.js')) @@ -25,7 +24,11 @@ module.exports.pitch = function (remainingRequest) { // direct css import from js --> direct, or manually call `styles.__inject__(ssrContext)` with `manualInject` option // css import from vue file --> component lifecycle linked // style embedded in vue file --> component lifecycle linked - var isVue = /"vue":true/.test(remainingRequest) || options.manualInject + var isVue = ( + /"vue":true/.test(remainingRequest) || + options.manualInject || + qs.parse(this.resourceQuery.slice(1)).vue != null + ) var shared = [ '// style-loader: Adds some css to the DOM by adding a