Skip to content

Releases: symfony/webpack-encore

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

14 May 23:27
Compare
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
Compare
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
Compare
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!

Fix for ESLint version 6

18 Apr 00:47
Compare
Choose a tag to compare

Hi friends!

This release fixes an oversight when using ESLint version 6:

  • bug #732 feat: add ESLint 6 support - thanks to @Kocal
  • minor #733 build(deps-dev): update eslint-loader to ^3 thanks to @Kocal

To upgrade:

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

  2. Run yarn upgrade!

Changes: v0.29.0..v0.29.1

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

Happy packing!

New Configuration Functions and major Dependency Bumps

17 Apr 14:58
Compare
Choose a tag to compare

Hi friends!

To upgrade:

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

  2. Run yarn upgrade!

Changes: v0.28.3..v0.29.0

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

Highlights:

  • Support for Node 8 was dropped.

  • [BC BREAK] Several loader dependencies we upgraded across major versions.
    These won't affect most users, but could affect you if you have custom
    configuration for those loaders that changed between versions:

    • css-loader upgraded from version 2 to 3 - #729 thanks to @weaverryan.
      CHANGELOG
      This shouldn't affect most users - you are most likely to be affected
      if you're using Encore.configureCssLoader().

    • style-loader upgraded from 0.21 to 1.1 - #710 thanks to @Grafikart.
      CHANGELOG
      Unless you're doing custom configuration, it's unlikely you're affected.

    • file-loader upgraded from 1.1 to 6 - #731 thanks to @weaverryan.
      CHANGELOG
      If you are importing images/fonts using the CommonJS syntax (require('foo.png')),
      you will now need to explicitely retrieve the default export (require('foo.png').default)
      in order to get the path of the file.
      Imports done using the import keyword should not be affected.

    • url-loader upgraded from allowing version 1 or 2 to allowing version 4 - #731 thanks to @weaverryan.
      CHANGELOG
      Unless you're doing custom configuration, it's unlikely you're affected.

  • [BC BREAK] If you're using enableEslintLoader(), Encore no longer
    configures eslint for you: you now must configure your own
    .eslintrc.js file. If this is missing, you'll now get a nice
    error about this telling you how to fix it - #687 thanks to @Kocal.

  • Added Encore.enableBabelTypeScriptPreset() to "compile" TypeScript with
    Babel, which is a more performant option than ts-loader - #694
    thanks to @Kocal.

  • Added Encore.configureDevServerOptions() as an easy way to configure
    dev-server options - #693 thanks to @Kocal.

  • Added Encore.addCacheGroup() method as an easy way to add custom
    caching groups - #680 thanks to @Lyrkan.

  • Include the .pcss extension for PostCSS files - #718 thanks to @opdavies

  • Added Encore.configureStyleLoader() to configure the style-loader - #715
    thanks to @tooltonix.

  • Added lintVue: true option to Encore.enableEslintLoader() to explicitly
    turn on linting of Vue files (which requires the vue-eslint-parser
    package) - #574 thanks to @Kocal.

Have packing!

v0.28.3 Fix eval sourcemaps used in dev

24 Feb 16:36
Compare
Choose a tag to compare

Hi!

Just one small bug fix for this release:

#697 Fix source maps being generated by default in dev (thanks to @Lyrkan)

Happy packing!

v0.28.2 Various bug fixes, minor feature

23 Nov 15:44
Compare
Choose a tag to compare

Yes! New Release!

This release adds some missing documentation and removes some deprecations.

  • #671 Add Encore.configureBabelPresetEnv() to the public API (thanks to @Lyrkan)
  • #651 Add .babelrc error to configureBabelPresetEnv and remove deprecations

To upgrade, run yarn upgrade!

Changes: v0.28.1..v0.28.2

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

Happy packing!

v0.28.1 Various bug fixes, minor feature

20 Nov 06:37
Compare
Choose a tag to compare

Yes! New Release!

  • #669 Fixing postcss error: newer versions seem to have a "Syntax Error: name - this PR also removed 2 unused dependencies: lodash and fs-extra.

  • #642 Allow to configure babel env preset (thanks to @ihmels)

  • #639 bug #638 sass-loader should not do css minification (thanks to @wimhendrikx)

  • #627 Allow to overwrite pre-defined aliases using addAliases() (thanks to @Lyrkan)

To upgrade, run yarn upgrade!

Changes: v0.28.0..v0.28.1

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

Happy packing!

v0.28.0 New options & less Babel transforms on production

09 Aug 12:46
Compare
Choose a tag to compare

Friends! A new release is here!

To upgrade:

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

  2. Run yarn upgrade!

Changes: v0.27.0..v0.28.0

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

Highlights:

  • Don't make @babel/preset-env use forceAllTransforms option
    in production - this will reduce build size in production
    for environments that only need to support more modern
    browsers - #612 thanks to @Lyrkan.

  • Added support with enablePostCssLoader() to process files
    ending in .postcss or using lang="postcss" in Vue - #594
    thanks to @Lyrkan.

  • Allow resolve-url-loader to be configured via enableSassLoader() -
    #603 thanks to @diegocardoso93.

  • Support was removed from Node 9 (a no-longer-supported version
    of Node) - #585 thanks to @weaverryan

v0.27.0 Babel useBuiltIns bug fix & Vue JSX Support!

10 Apr 16:53
Compare
Choose a tag to compare

Zoinks! Another release is ready!

To upgrade:

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

  2. Run yarn upgrade!

Changes: v0.26.0..v0.27.0

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

Highlights:

  • [Behavior Change] The Babel configuration sourceType default was
    changed from not being specified (so, the default module was used)
    to unambiguous. This is to help Babel's useBuiltIns functionality
    properly determine if a require or import should be automatically
    added to your files, based on that file's style - #555 thanks to @Lyrkan.

  • Added JSX support to Vue! #553 thanks to @Kocal.

  • Cleaned up the jsdoc in index.js to add better docs and better
    IDE auto-completion - #550 thank sto @Lyrkan.

Happy packing!