Skip to content

Deprecate Vue 2 support #1298

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 15 additions & 7 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,7 @@

## UNRELEASED

* #1259 Update yarn used for test_apps to latest version (@karpilin)

* #1275 Update some dev-dependencies to fix vulnerability issues (@Kocal)

* #1278 Deprecate ESLint integration (@Kocal)
### Features

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

Expand All @@ -16,7 +12,7 @@

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

Enabling JSX support for Vue 3 is done with the `Encore.enableVueLoader()`:
Enabling JSX support for Vue 3 is done with the `Encore.enableVueLoader()`:
```js
Encore.enableVueLoader(() => {}, {
useJsx: true,
Expand All @@ -25,7 +21,7 @@ Encore.enableVueLoader(() => {}, {
```

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

### Deprecations

* #1278 Deprecate ESLint integration (@Kocal)

* #1298 Deprecate Vue 2 support (@Kocal)

### Internal

* #1275 Update some dev-dependencies to fix vulnerability issues (@Kocal)

* #1259 Update yarn used for test_apps to latest version (@karpilin)

* #1297 Upgrade GitHub Actions in CI (@Kocal)

## [v4.6.1](https://github.com/symfony/webpack-encore/releases/tag/v4.6.1)
Expand Down
3 changes: 3 additions & 0 deletions lib/config-generator.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,9 @@ class ConfigGenerator {
switch (vueVersion) {
case 2:
case '2.7':
logger.deprecation('The support for Vue 2 is deprecated and will be removed in the next major version of Encore.' +
' Please upgrade to Vue 3, and if necessary remove the "version" setting or set it to 3 when calling ".enableVueLoader()".');

config.resolve.alias['vue$'] = 'vue/dist/vue.esm.js';
break;
case 3:
Expand Down