From b96af78e80afcbee3420f64d2483f8e1d7a6fad0 Mon Sep 17 00:00:00 2001 From: Evan You Date: Thu, 11 May 2023 11:27:51 +0100 Subject: [PATCH 1/4] chore: changelog --- CHANGELOG.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ff0cbe416..4f4f4e633 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,21 @@ +## [17.1.1](https://github.com/vuejs/vue-loader/compare/v17.1.0...v17.1.1) (2023-05-11) + + +### Bug Fixes + +* support propsDestructure and defineModel options ([6269698](https://github.com/vuejs/vue-loader/commit/6269698f9fda37f0e3849db3e8b8e67ad1862f57)) + + + +# [17.1.0](https://github.com/vuejs/vue-loader/compare/v17.1.0-beta.0...v17.1.0) (2023-04-26) + + +### Bug Fixes + +* do not throw when `Rule.layer` ([#2000](https://github.com/vuejs/vue-loader/issues/2000)) ([ef589df](https://github.com/vuejs/vue-loader/commit/ef589df2956506a5a7bbc050c476501d32dd8469)) + + + # [17.1.0](https://github.com/vuejs/vue-loader/compare/v17.1.0-beta.0...v17.1.0) (2023-04-26) From a81dc0f573d216eefa13b0275f3fc147bf3e2ef3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Vo=C5=99=C3=AD=C5=A1ek?= Date: Sun, 28 May 2023 10:01:11 +0200 Subject: [PATCH 2/4] fix: keep build stable when run in a different path (#2040) By making the `exportHelperPath` a relative path so that the generated code is consistent. --- src/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/index.ts b/src/index.ts index dabc5c000..aa4dfc9df 100644 --- a/src/index.ts +++ b/src/index.ts @@ -58,7 +58,7 @@ export interface VueLoaderOptions { let errorEmitted = false const { parse } = compiler -const exportHelperPath = JSON.stringify(require.resolve('./exportHelper')) +const exportHelperPath = require.resolve('./exportHelper') export default function loader( this: LoaderContext, @@ -296,7 +296,7 @@ export default function loader( if (!propsToAttach.length) { code += `\n\nconst __exports__ = script;` } else { - code += `\n\nimport exportComponent from ${exportHelperPath}` + code += `\n\nimport exportComponent from ${stringifyRequest(exportHelperPath)}` code += `\nconst __exports__ = /*#__PURE__*/exportComponent(script, [${propsToAttach .map(([key, val]) => `['${key}',${val}]`) .join(',')}])` From 40b93b9c2722e85a000de62e3eb8bc02facafd10 Mon Sep 17 00:00:00 2001 From: Haoqun Jiang Date: Sun, 28 May 2023 22:39:22 +0800 Subject: [PATCH 3/4] fix: properly close the watcher after tests --- src/pluginWebpack4.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/pluginWebpack4.ts b/src/pluginWebpack4.ts index fb0669870..335a6a0a9 100644 --- a/src/pluginWebpack4.ts +++ b/src/pluginWebpack4.ts @@ -171,6 +171,15 @@ class VueLoaderPlugin { watcher.close() } }) + + // In some cases, e.g. in this project's tests, + // even though needsHMR() returns true, webpack is not watching, thus no watchClose hook is called. + // So we need to close the watcher when webpack is done. + compiler.hooks.done.tap(id, () => { + if (watcher) { + watcher.close() + } + }) } } } From 4b726337691947b4a74f6293c3ace9385088b887 Mon Sep 17 00:00:00 2001 From: Haoqun Jiang Date: Mon, 29 May 2023 12:01:25 +0800 Subject: [PATCH 4/4] 17.1.2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 2f5134289..bf2d9a177 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "vue-loader", - "version": "17.1.1", + "version": "17.1.2", "license": "MIT", "author": "Evan You", "repository": "vuejs/vue-loader",