Skip to content
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

Update dependency @symfony/webpack-encore to v5 #876

Merged
merged 1 commit into from
Sep 30, 2024

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Sep 29, 2024

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
@symfony/webpack-encore ^4.2.0 -> ^5.0.0 age adoption passing confidence

Release Notes

symfony/webpack-encore (@​symfony/webpack-encore)

v5.0.0

Compare Source

This is a new major version that contains several backwards-compatibility breaks.

Features
  • #​1344 Add options configuration callback to Encore.enableReactPreset() (@​Kocal)

  • #​1345 Add support for integrity hashes when asset names contain a query string (@​Kocal)

BC Breaks

The dev-server options have changed between versions 4 and 5, see the official migration guide to v5.
For example:

// With webpack-dev-server 4:
Encore.configureDevServerOptions((options) => {
   options.https = {
     ca: "./path/to/server.pem",
     pfx: "./path/to/server.pfx",
     key: "./path/to/server.key",
     cert: "./path/to/server.crt",
     passphrase: "webpack-dev-server",
     requestCert: true,
   };
});

// With webpack-dev-server 5 (now):
Encore.configureDevServerOptions((options) => {
   options.server = {
      type: 'https',
      options: {
         ca: "./path/to/server.pem",
         pfx: "./path/to/server.pfx",
         key: "./path/to/server.key",
         cert: "./path/to/server.crt",
         passphrase: "webpack-dev-server",
         requestCert: true,
      }
   };
});

The webpack-dev-server package is now an optional peer dependency.
It has been removed because some projects may not use it, and it was installing a bunch of unnecessary dependencies.

Removing the webpack-dev-server dependency from Encore reduces the number of dependencies from 626 to 295 (-331!),
it helps to reduce the size of the node_modules directory and the number of possible vulnerabilities.

To use the webpack-dev-server again, you need to install it manually:

npm install webpack-dev-server --save-dev

v4.7.0

Compare Source

Features

Enabling JSX support for Vue 3 is done with the Encore.enableVueLoader():

Encore.enableVueLoader(() => {}, { 
    useJsx: true,
    version: 3,
});

If you don't have a custom Babel configuration, then you're all set!
But if you do, you may need to adjust it
to add @vue/babel-plugin-jsx plugin to your Babel configuration:

// babel.config.js
module.exports = {
    plugins: [
        '@​vue/babel-plugin-jsx'
    ]
};
Deprecations
Internal

v4.6.1: Re-add support for Node 18

Compare Source

Hey packagers!

It seems I was a bit too quick to drop support for Node 18. This re-adds it.

Upgrading

Run:

npm install "@​symfony/webpack-encore@^4.6.1" --save-dev

Or:

yarn upgrade "@​symfony/webpack-encore@^4.6.1"

Changes: symfony/webpack-encore@v4.6.0...v4.6.1

Happy Packing!

v4.6.0

Compare Source

v4.5.0

Compare Source


Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Enabled.

Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot merged commit 4ea088c into 4.3.x Sep 30, 2024
32 checks passed
@renovate renovate bot deleted the renovate/symfony-webpack-encore-5.x branch September 30, 2024 00:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

0 participants