From 4a6c1037d16c67d0399fe76b623c6acd6f9459f5 Mon Sep 17 00:00:00 2001 From: Haoqun Jiang Date: Thu, 1 Jun 2023 16:58:24 +0800 Subject: [PATCH 01/28] chore: v17.2.1 changelog [skip ci] --- CHANGELOG.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 81fc0c72f..be886b7b4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,14 @@ +## [17.2.1](https://github.com/vuejs/vue-loader/compare/v17.1.2...v17.2.1) (2023-06-01) + + +### Features + +* A new `experimentalInlineMatchResource` option (webpack 5 only), which leverages webpack 5's inline match resource feature and works well with the [`experiments.css`](https://webpack.js.org/configuration/experiments/#experimentscss) feature ([#2046](https://github.com/vuejs/vue-loader/issues/2046)) ([3149f6d](https://github.com/vuejs/vue-loader/commit/3149f6d69c2f456bdcfa23acc0da93473a93a764)) + + +Note: v17.2.0 was released by accident, it has the same content as v17.1.2, therefore not included in the changelog. + + ## [17.1.2](https://github.com/vuejs/vue-loader/compare/v17.1.1...v17.1.2) (2023-05-29) From 6968b38a661b5bfd5df8004f45249718dd906941 Mon Sep 17 00:00:00 2001 From: Hana Date: Fri, 2 Jun 2023 14:03:09 +0800 Subject: [PATCH 02/28] chore: update readme (#2047) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b3f34888c..aae03ae3d 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ - [Documentation](https://vue-loader.vuejs.org) -## v17.1+ Only Options +## v17.2.1+ Only Options - `experimentalInlineMatchResource: boolean`: enable [Inline matchResource](https://webpack.js.org/api/loaders/#inline-matchresource) for rule matching for vue-loader. From f3f45df925bcd80307232e7410ead355f87953d3 Mon Sep 17 00:00:00 2001 From: Hana Date: Fri, 2 Jun 2023 14:16:32 +0800 Subject: [PATCH 03/28] fix: windows path for `experiments.css` (#2049) --- src/pitcher.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/pitcher.ts b/src/pitcher.ts index f12f5405a..426dd1c7d 100644 --- a/src/pitcher.ts +++ b/src/pitcher.ts @@ -88,9 +88,13 @@ export const pitch = function () { return typeof loader === 'string' ? loader : loader.request }) .join('!') - return `@import "${context.resourcePath}${ - query.lang ? `.${query.lang}` : '' - }${context.resourceQuery}!=!-!${loaderString}!${context.resource}";` + const styleRequest = stringifyRequest( + context, + `${context.resourcePath}${query.lang ? `.${query.lang}` : ''}${ + context.resourceQuery + }!=!-!${loaderString}!${context.resource}` + ) + return `@import ${styleRequest};` } const cssLoaderIndex = loaders.findIndex(isCSSLoader) if (cssLoaderIndex > -1) { From 790ef9dcee58d9eeca4e482294210ec29d9524f1 Mon Sep 17 00:00:00 2001 From: Haoqun Jiang Date: Fri, 2 Jun 2023 14:21:04 +0800 Subject: [PATCH 04/28] 17.2.2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 45c9cc97b..0899b137e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "vue-loader", - "version": "17.2.1", + "version": "17.2.2", "license": "MIT", "author": "Evan You", "repository": "vuejs/vue-loader", From 8357e071c45e77de0889a9feedf2079a327f69d4 Mon Sep 17 00:00:00 2001 From: Haoqun Jiang Date: Fri, 2 Jun 2023 14:21:35 +0800 Subject: [PATCH 05/28] chore: v17.2.2 changelog --- CHANGELOG.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index be886b7b4..84ce6ea2d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,12 @@ +## [17.2.2](https://github.com/vuejs/vue-loader/compare/v17.2.1...v17.2.2) (2023-06-02) + + +### Bug Fixes + +* windows path for `experiments.css` ([#2049](https://github.com/vuejs/vue-loader/issues/2049)) ([f3f45df](https://github.com/vuejs/vue-loader/commit/f3f45df925bcd80307232e7410ead355f87953d3)) + + + ## [17.2.1](https://github.com/vuejs/vue-loader/compare/v17.1.2...v17.2.1) (2023-06-01) From 98782e794fadca83b600b047b55aa6f0c230cc25 Mon Sep 17 00:00:00 2001 From: Jinjiang Date: Sat, 7 Oct 2023 14:57:44 +0800 Subject: [PATCH 06/28] feat: skip normal css files without scoped flag in stylePostLoader (#2053) --- src/stylePostLoader.ts | 12 ++++++++++++ test/core.spec.ts | 4 ++-- test/template.spec.ts | 4 ++-- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/src/stylePostLoader.ts b/src/stylePostLoader.ts index 544924ea6..59c664d5b 100644 --- a/src/stylePostLoader.ts +++ b/src/stylePostLoader.ts @@ -9,6 +9,18 @@ const { compileStyle } = compiler // for any diff --git a/test/style.spec.ts b/test/style.spec.ts index 4bb998dbe..72fb3cbd3 100644 --- a/test/style.spec.ts +++ b/test/style.spec.ts @@ -198,4 +198,22 @@ test('CSS Modules Extend', async () => { expect(style).toContain(`.${instance.$style.red} {\n color: #FF0000;\n}`) }) -test.todo('experimental