Skip to content

Releases: symfony/webpack-encore

Fixes related to webpack-dev-server & HMR

01 Mar 02:09
Compare
Choose a tag to compare

Hi Webpackers!

This release fixes some bad behavior when using HMR with the dev-server. Previously, on any change (even those where the page should have been updated with HMR without a page refresh), the page would refresh. PR #939 fixes that by disabling auto-refresh. This means that your page will not refresh automatically after making a change. This was a trade-off, as HMR was unusable currently. Hopefully a future version of webpack-dev-server may address this.

Other PR's include:

  • minor #940 Clarify missing css file error message (thanks to @Gadgetdude)
  • bug #938 Require vue-loader 15.9.5 to work with Encore 1.0 (thanks to @weaverryan)

To upgrade:

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

Changes: https://github.com/symfony/webpack-encore/compare/v1.1.1..v1.1.2

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

Happy packing!

Fixing bug with copyFiles()

19 Feb 00:59
Compare
Choose a tag to compare

Hi Webpackers!

This release fixes a bug that was introduced with Encore 1.0 and Webpack 5 related to copyFiles(). See #894 for the details.

The fix was done in #930 - a big thanks to @Lyrkan.

To upgrade:

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

Changes: https://github.com/symfony/webpack-encore/compare/v1.1.0..v1.1.1

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

Happy packing!

Allow new versions of sass, less, stylus and postcss loaders

12 Feb 02:18
Compare
Choose a tag to compare

Hi Webpackers!

This release allows you to use the newest version of 4 loaders without warnings:

  • Allow postcss-loader 5
  • Allow less-loader 8
  • Allow sass-loader 11
  • Allow stylus-loader 5

To upgrade:

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

Changes: https://github.com/symfony/webpack-encore/compare/v1.0.6..v1.1.0

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

Happy packing!

Fix for manifest.json file with images & fonts

12 Feb 00:13
Compare
Choose a tag to compare

Hi Webpackers!

This release fixes a problem the "keys" inside manifest.json for some images and fonts - see #907. This was fixed in #921.

If you continue to have any issues with your manifest.json file, please open an issue. We use a 3rd party library - webpack-manifest-plugin - and we've been working with them to smooth out their Webpack 5 compatibility.

To upgrade:

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

Changes: https://github.com/symfony/webpack-encore/compare/v1.0.5..v1.0.6

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

Happy packing!

Bug fix: using "dev-server" with an https certificate

06 Feb 20:48
Compare
Choose a tag to compare

Hi Webpackers!

This release fixes a problem if you're using the dev-server mode with custom https configuration (like setting a pfx for the ssl certificate). See #903.

If you want to run the dev-server in https with some custom configuration, you should configure it entirely in webpack.config.js. For example, if you're using the Symfony binary and want to re-use its https certificate:

const path = require('path');
// ...

     .configureDevServerOptions(options => {
         options.https = {
             pfx: path.join(process.env.HOME, '.symfony/certs/default.p12'),
         }
     })

Then, do NOT pass the --https flag at the command line. Just run:

yarn dev-server

To upgrade:

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

Changes: v1.0.4..v1.0.5

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

Happy packing!

Fixing incorrect warning with stimulus-loader v2

02 Feb 20:21
Compare
Choose a tag to compare

Hi Webpackers!

This release fixes an incorrect warning if you're using @symfony/stimulus-bridge version 2. It also outputs a warning if you're using v1 of that library.

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

Changes: v1.0.3..v1.0.4

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

Happy packing!

Fixed performance regression in "watch" and dev-server

31 Jan 18:17
Compare
Choose a tag to compare

Hi Webpackers!

This release fixes a performance regression when using watch or dev-server. In both cases, every "re-build" would take as long as the original build. See #905 for the fix.

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

Changes: v1.0.2..v1.0.3

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

Happy packing!

Fix bug with dev-server and missing manifest.json file

29 Jan 00:57
Compare
Choose a tag to compare

Hi Webpackers!

This release fixes a bug when using dev-server along with cleanOutputBeforeBuild(). The result would be that the manifest.json file would be missing from the output directory. That was fixed in #901.

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

Changes: v1.0.1..v1.0.2

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

Happy packing!

Fix invalid options passed to dev-server

29 Jan 00:55
Compare
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
Compare
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!