Skip to content

Commit 881eec3

Browse files
committed
minor #1298 Deprecate Vue 2 support (Kocal)
This PR was merged into the main branch. Discussion ---------- Deprecate Vue 2 support Close #1276, Vue 2 has reached its end of life the 31st december 2023. If I install `vue@2` or if I specify `version: 2` in `.enableVueLoader()`, a deprecation message is now shown: <img width="1733" alt="image" src="https://github.com/user-attachments/assets/c96f7f79-4a7c-425b-a8ba-22c3cb6b1e43"> Commits ------- 8327d0b Deprecate Vue 2 support
2 parents 82e55ec + 8327d0b commit 881eec3

File tree

2 files changed

+18
-7
lines changed

2 files changed

+18
-7
lines changed

CHANGELOG.md

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,7 @@
22

33
## UNRELEASED
44

5-
* #1259 Update yarn used for test_apps to latest version (@karpilin)
6-
7-
* #1275 Update some dev-dependencies to fix vulnerability issues (@Kocal)
8-
9-
* #1278 Deprecate ESLint integration (@Kocal)
5+
### Features
106

117
* #1284 Improve ESLint and Babel help messages, when enabling ESLint integration (@Kocal)
128

@@ -16,7 +12,7 @@
1612

1713
* #1295 Add JSX support for Vue 3 (@Kocal)
1814

19-
Enabling JSX support for Vue 3 is done with the `Encore.enableVueLoader()`:
15+
Enabling JSX support for Vue 3 is done with the `Encore.enableVueLoader()`:
2016
```js
2117
Encore.enableVueLoader(() => {}, {
2218
useJsx: true,
@@ -25,7 +21,7 @@ Encore.enableVueLoader(() => {}, {
2521
```
2622

2723
If you don't have a custom Babel configuration, then you're all set!
28-
But if you do, you may need to adjust it
24+
But if you do, you may need to adjust it
2925
to add [`@vue/babel-plugin-jsx`](https://github.com/vuejs/babel-plugin-jsx) plugin to your Babel configuration:
3026
```js
3127
// babel.config.js
@@ -36,6 +32,18 @@ module.exports = {
3632
};
3733
```
3834

35+
### Deprecations
36+
37+
* #1278 Deprecate ESLint integration (@Kocal)
38+
39+
* #1298 Deprecate Vue 2 support (@Kocal)
40+
41+
### Internal
42+
43+
* #1275 Update some dev-dependencies to fix vulnerability issues (@Kocal)
44+
45+
* #1259 Update yarn used for test_apps to latest version (@karpilin)
46+
3947
* #1297 Upgrade GitHub Actions in CI (@Kocal)
4048

4149
## [v4.6.1](https://github.com/symfony/webpack-encore/releases/tag/v4.6.1)

lib/config-generator.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,9 @@ class ConfigGenerator {
133133
switch (vueVersion) {
134134
case 2:
135135
case '2.7':
136+
logger.deprecation('The support for Vue 2 is deprecated and will be removed in the next major version of Encore.' +
137+
' Please upgrade to Vue 3, and if necessary remove the "version" setting or set it to 3 when calling ".enableVueLoader()".');
138+
136139
config.resolve.alias['vue$'] = 'vue/dist/vue.esm.js';
137140
break;
138141
case 3:

0 commit comments

Comments
 (0)