Skip to content

Commit

Permalink
Deprecate Vue 2 support
Browse files Browse the repository at this point in the history
  • Loading branch information
Kocal committed Aug 23, 2024
1 parent 82e55ec commit 8327d0b
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 7 deletions.
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

0 comments on commit 8327d0b

Please sign in to comment.