@symfony/webpack-encore
Advanced tools
Changelog
This major release makes Encore compatible with Yarn Plug'n'Play and pnpm.
package.json
: webpack webpack-cli @babel/core @babel/preset-env
(#1142 and #1150):npm install webpack webpack-cli @babel/core @babel/preset-env --save-dev
# or via yarn
yarn add webpack webpack-cli @babel/core @babel/preset-env --dev
package.json
and Babel configuration: @babel/plugin-syntax-dynamic-import @babel/plugin-proposal-class-properties
,
since they are already included in @babel/preset-env
(#1150):npm remove @babel/plugin-syntax-dynamic-import @babel/plugin-proposal-class-properties
# or via yarn
yarn remove @babel/plugin-syntax-dynamic-import @babel/plugin-proposal-class-properties
and remove it from your Encore configuration:
Encore.configureBabel((options) => {
- config.plugins.push('@babel/plugin-proposal-class-properties');
+
})
Changelog
July 8th, 2022
This major release drops support for Node 12 (minimum is now Node 14) and also bumps some dependencies up a new major version.
In #1122 support for Node 12 was dropped.
In #1133, the following dependencies were bumped a major version:
css-minimizer-webpack-plugin
3.4 -> 4.0 (4.0 just drops Node 12 support)less-loader
10 -> 11postcss-loader
6 -> 7sass-loader
12 -> 13stylus
0.57 -> 0.58stylus-loader
6 -> 7If you're using any of these (all are optional except for css-minimizer-webpack-plugin
and are extended them with custom configuration, check the CHANGELOG of each for
any possible BC breaks).
Changelog
May 3rd, 2022
This is a new major version that contains several backwards-compatibility breaks.
The following dependencies were upgraded a major version. It's unlikely these will cause problems, unless you were further configuring this part of Encore:
clean-webpack-plugin
Version 3
to 4
: dropped old Node & Webpack version supportcss-loader
Version 5
to 6
: dropped old Node version support & CHANGELOGcss-minimizer-webpack-plugin
Version 2
to 3
: dropped old Node version supportloader-utils
REMOVEDmini-css-extract-plugin
Version 1.5
to 2.2.1
: dropped old Node & Webpack version support & CHANGELOGpretty-error
Version 3.0
to 4.0
: dropped old Node version supportresolve-url-loader
Version 3.0
to 5.0
: dropped old Node version support, requires postcss ^8.0
, remove rework
engine & CHANGELOGstyle-loader
Version 2
to 3
: dropped old Node and Webpack version support & CHANGELOGyargs-parser
Version 20.2
to 21
: dropped old Node version supportAdditionally, Encore changed the supported versions of the following packages, which you may have installed to enable extra features:
eslint
Minimum version increased from 7
to 8
eslint-webpack-plugin
Minimum version increased from 2.5
to 3
fork-ts-checker-webpack-plugin
Minimum version increased from 5
to 6
CHANGELOG
less-loader
Minimum version increased from 7
to 10
postcss-loader
Minimum version increased from 4
to 6
preact
Minimum version increased from 8
to 10
CHANGELOG
sass-loader
Minimum version increased from 9
to 12
stylus
Minimum version increased from 0.54
to 0.56
stylus-loader
Minimum version increased from 3
to 6
CHANGELOG
vue-loader
Minimum version increased from 16
to 17
CHANGELOG
Removed Encore.enableEslintLoader()
: use Encore.enableEslintPlugin()
.
If using enableEslintPlugin()
with the @babel/eslint-parser
parser,
you may now need to create an external Babel configuration file. To see
an example, temporarily delete your .eslintrc.js
file and run Encore.
The error will show you a Babel configuration file you can use.
With configureDefinePlugin()
, the options['process.env']
key format
passed to the callback has changed (see #960). If you are using configureDefinePlugin()
to add more items to process.env
, your code will need to change:
Encore.configureDefinePlugin((options) => {
- options['process.env']['SOME_VAR'] = JSON.stringify('the value');
+ options['process.env.SOME_VAR'] = JSON.stringify('the value');
})