Skip to content

Releases: symfony/webpack-encore

Fix invalid options passed to dev-server

29 Jan 00:55

Choose a tag to compare

Hi Webpackers!

This release fixes a bug related to version 4 of webpack-dev-server (which is included in version 1 of this library). The code still relied on several, removed options. See #899 for more details.

yarn upgrade "@symfony/webpack-encore@^1.0.1"

Changes: v1.0.0..v1.0.1

Documentation: http://symfony.com/doc/current/frontend.html

Happy packing!

Hello Encore 1.0 & Webpack 5!

27 Jan 20:15

Choose a tag to compare

Hi Webpackers!

Today I'm thrilled to release Encore 1.0. In reality, Encore has been stable for years and has, as often as possible, deprecated features instead of hard breaking.

Most importantly, this release upgrades Webpack from 4 to 5, and a number of other dependencies have also been upgraded.

To upgrade run:

yarn upgrade "@symfony/webpack-encore@^1.0.0"

Changes: v0.33.0..v1.0.0

Documentation: http://symfony.com/doc/current/frontend.html

Highlights:

  • [DEPENDENCY UPGRADE] Webpack was upgraded from version 4 to 5.

  • [DEPENDENCY UPGRADES] The following packages had major version upgrades:

    • css-loader from 3 to 5
    • assets-webpack-plugin from 5 to 7
    • mini-css-extract-plugin from 0.4 to 1
    • style-loader from 1 to 2
    • terser-webpack-plugin from 1 to 5
    • webpack-cli from 3 to 4
    • webpack-manifest-plugin from 2 to 3
    • webpack-manifest-plugin from 3 to 4-beta
  • [DEPENDENCY SUPPORT CHANGES] Encore has changed what versions it supports
    of the following packages:

    • less from 3 to 4 and less-loader from 6 to 7
    • fork-ts-checker-webpack-plugin from 4 to 5 or 6
  • [BC BREAK] Image and font processing was changed from using file-loader
    (and optionally url-loader via configureUrlLoader()) to Webpack 5's
    new Asset Modules.
    In practice, unless you have a highly-configured system, this should
    not cause significant changes.

  • [BC BREAK] The configureUrlLoader() method was removed. See
    configureImageRule() and configureFontRule() - specifically the
    maxSize option and type: 'asset'. The url-loader is no longer used.

  • [BC BREAK] The disableImagesLoader() and disableFontsLoader() methods
    have been removed. See configureImageRule() and configureFontRule()
    for a new option to disable these.

  • [BC BREAK] The configureFilenames() method no longer accepts paths
    for images or fonts. See configureImageRule() and configureFontRule()
    for how to configure these filenames. The configureFilenames() method
    does now accept an assets option, but out-of-the-box, this will not
    result in any filename changes. See configureFilenames() for more details.

  • [BC BREAK] optimize-css-assets-webpack-plugin was replaced by
    css-minimizer-webpack-plugin and the optimizeCssPluginOptionsCallback()
    method was replaced by cssMinimizerPluginOptionsCallback().

  • [BC BREAK] The file-loader package is no longer required by Encore. If
    you use copyFiles(), you will need to install it manually (you
    will receive a clear error about this).

  • [BC BREAK] All previously-deprecated methods & options were removed.

  • [BEHAVIOR CHANGE] The HashedModuleIdsPlugin was previously used to
    help name "modules" when building for production. This has been removed
    and we now use Webpack's native optimization.moduleIds option, which
    is set to deterministic.

  • [configureMiniCssExtractPlugin()] configureMiniCssExtractPlugin() was
    added to allow the MiniCssExtractPlugin.loader and MiniCssExtractPlugin
    to be configured.

  • [enableBuildCache()] Added enableBuildCache() to enable the new
    Webpack 5 build caching. https://webpack.js.org/blog/2020-10-10-webpack-5-release/
    This feature should be considered experimental.

Happy Webpacking!

Dependency Upgrades & disableCssExtraction() Flag

03 Dec 18:45

Choose a tag to compare

Yes! New Release!

This release is mostly about upgrading Encore's "dev" dependencies, which don't affect your project. What
this does do is change the versions that Encore guarantees support for. For example, if you have postcss-loader
installed in your app, this release no longer guarantees support for version 3, but we now DO guarantee
support for version 4.

To upgrade run:

yarn upgrade "@symfony/webpack-encore@^0.33.0"

Changes: v0.32.1..v0.33.0

Documentation: http://symfony.com/doc/current/frontend.html

Highlights:

  • [disableCssExtraction()] Added boolean argument to disableCssExtraction()
    to make it easier to dynamically disable extraction - #756 thanks
    to @football2801.

  • [DEPENDENCY UPGRADE] Vue 3 was already supported, but the dependencies
    have been upgraded to explicitly support the stable version, instead
    of beta versions - #869 thanks to @weaverryan

  • [DEPENDENCY UPGRADE] Explicit support for postcss-loader v3 was
    dropped but support for v4 was added - #854 thanks to @railto.

  • [DEPENDENCY UPGRADE] Support for sass-loader v10 was added - #865
    thanks to @shmshd.

  • Allowed using copyFiles() even if you don't have any other
    entrypoints - #831 thanks to @pszalko.

  • [DEPENDENCY UPGRADE] Support for ts-loader was upgraded from
    ^5.3 to ^8.0.1. This means that only ^8.0.1 of ts-loader
    is guaranteed to work - #800 thanks to @skmedix.

  • [DEPENDENCY UPGRADE] Support for eslint v5 was removed but support
    for v7 was added. Also, eslint-loader support for v3 was removed
    but support for v4 was added - see #774 thanks to @Kocal.

Happy packing!

Fixing requirement on @symfony/stimulus-bridge/webpack-helper module

03 Dec 12:44

Choose a tag to compare

Hey Webpackers!

This release contains a bug fix for 0.32.0 where Encore would always require
the @symfony/stimulus-bridge/webpack-helper module, even if you were not
using the Stimulus helper.

To upgrade run:

yarn upgrade "@symfony/webpack-encore@^0.32.1"

Changes: v0.32.0..v0.32.1

Documentation: http://symfony.com/doc/current/frontend.html

Highlights:

  • Fixing a bug where the new Stimulus Bridge always required the
    @symfony/stimulus-bridge/webpack-helper module, even if you
    were not using this feature - #863 thanks to @Kocal

Adding Symfony UX integration: enableStimulusBridge()

03 Dec 11:42

Choose a tag to compare

Hi Webpackers!

This release introduces a new feature to work with Symfony's new UX system 🎆 https://symfony.com/blog/new-in-symfony-the-ux-initiative-a-new-javascript-ecosystem-for-symfony

To upgrade run:

yarn upgrade "@symfony/webpack-encore@^0.32.0"

Changes: v0.31.1..v0.32.0

Documentation: http://symfony.com/doc/current/frontend.html

Highlights:

  • [enableStimulusBridge] The new enableStimulusBridge() method was
    added to enable the Stimulus bridge and Symfony UX features. See
    https://symfony.com/ux for more details and #859 thanks to @tgalopin.

Happy packing!

Small dependency bump in resolve-url-loader

03 Dec 11:40

Choose a tag to compare

Hi Webpackers!

This is very small release that bumps one dependency.

To upgrade run:

yarn upgrade "@symfony/webpack-encore@^0.31.1"

Changes: v0.31.0..v0.31.1

Documentation: http://symfony.com/doc/current/frontend.html

Highlights:

  • [DEPENDENCY UPGRADE] resolve-url-loader was updated from ^3.0.1
    to ^3.1.2, which should not affect most users. See #848 thanks
    to @Khartir.

Have fun!

Bump of various dependency version

10 Sep 01:05

Choose a tag to compare

Hi Webpackers!

This is a small release that bumps a few dependencies.

To upgrade:

  1. Update your package.json file: set the @symfony/webpack-encore version to ^0.31.0.

  2. Run yarn upgrade!

Changes: v0.30.2..v0.31.0

Documentation: http://symfony.com/doc/current/frontend.html

Highlights:

  • [DEPENDENCY UPGRADE] assets-webpack-plugin was updated from ^3.9.7
    to ^5.1.1, which should not affect most users.

  • [DEPENDENCY UPGRADE] less-loader was updated from ^4.1.0
    to ^6.2.0. This will likely not affect you unless you're passing
    certain custom options in enableLessLoader(): CHANGELOG

  • [DEPENDENCY UPGRADE] sass-loader was updated from ^8.0.0
    to ^9.0.1, which has some options-related changes: CHANGELOG

Fixing bug with clean-webpack-plugin deleting files in watch mode

14 May 23:27

Choose a tag to compare

Hi friends!

This release disables the cleanStaleWebpackAssets in clean-webpack-plugin by default to fix a bug where - in watch mode - some images or fonts would be incorrectly deleted. See #772 - thanks to @weaverryan.

To upgrade:

  1. Update your package.json file: set the @symfony/webpack-encore version to ^0.30.2.

  2. Run yarn upgrade!

v0.30.1...v0.30.2

Happy packing!

Reverting to friendlier Vue full build

13 May 12:23

Choose a tag to compare

Hi friends!

This is a small release that reverts a change made in 0.30.0 related to Vue and a "full" build. See #769 for more details.

To upgrade:

  1. Update your package.json file: set the @symfony/webpack-encore version to ^0.30.1.

  2. Run yarn upgrade!

v0.30.0...v0.30.1

Happy packing!

Major dependency upgrades, Vue runtime only, Vue3 support

11 May 10:43

Choose a tag to compare

Hi friends!

This is a big release that contains major upgrades to packages that Encore (and your app) depends on. Some of these upgrades may affect your app. Please check out the details below to learn more.

Changes: v0.29.1...v0.30.0

Highlights

  • [BC BREAK] The Vue "build" was changed from vue.esm.js (full build) to vue.runtime.esm.js (runtime build). With the runtime build, there are two things that you cannot do:

    A) You cannot pass a string to template:

    new Vue({
      template: '<div>{{ hi }}</div>'
    })

    B) You cannot mount to a DOM element and use its HTML as your template:

     new Vue({
       el: '#app', // where <div id="app"> contains your Vue template
     });

    If you need this behavior, call Encore.addAliases({ vue$: 'vue/dist/vue.esm.js' });

  • [DEPENDENCY UPGRADE] sass-loader was upgraded from version 7 to 8.
    See the CHANGELOG for breaking changes. This likely will not affect you unless you pass custom options to Encore.enableSassLoader(): several options were moved or renamed - #758 thanks to @Kocal.

  • [BEHAVIOR CHANGE] Encore now resolves loaders directly from its node_modules/, instead of by name. This change will cause a behavior change if you do any of the following:

    • Add a different version of a loader (that Encore embeds) into your package.json: the different loader won't be used anymore.

    • Require a package that also included one of our embedded loaders: depending on which one was hoisted it could result in different behavior.

    • Manipulate the generated config and filter loaders based on their names: the comparison won't be the same anymore

    See #739 thanks to @Lyrkan.

  • [DEPENDENCY UPGRADE] Webpack minimum version was changed from 4.20.0 to 4.36.0 - see #746 and #758.

  • [DEPENDENCY UPGRADE] Upgraded clean-webpack-plugin from ^0.1.19 to ^3.0.0. You should not notice significant changes unless you use Encore.cleanupOutputBeforeBuild() and pass custom options. For more info, see v1 to v2 upgrade notes and v2 to v3 upgrade notes. There were no changes from 0.1.19 to 1.0.0. See #760 thanks to @weaverryan.

  • Encore will now correctly recognize a project-wide babel.config.js file - #738 thanks to @jdreesen.

  • [DEPENDENCY UPGRADE] The fork-ts-checker-webpack-plugin package was upgraded for the tests from ^0.4.1 to ^4.0.0. If you're using enableForkedTypeScriptTypesChecking(), you control the fork-ts-checker-webpack-plugin version in your package.json file. You should upgrade to ^4.0.0 to ensure that the plugin works correctly with Encore. See fork-ts-checker-webpack-plugin for details about the changes. See #759 thanks to @weaverryan.

  • Added support for Vue3 - #746 thanks to @weaverryan.

Happy Packing!