This is a new major version that contains several backwards-compatibility breaks, but for the best!
- Remove support of Node.js <22.13.0
- Remove support of babel-loader@^9.1.3, see possible BC breaks in 10.0.0 release notes
- Remove support of style-loader@^3.3.0, see possible BC breaks in 4.0.0 release notes
- Remove support of less-loader@^11.0.0, see possible BC breaks in 12.0.0 release notes
- Remove support of postcss-loader@^7.0.0, see possible BC breaks in 8.0.0 release notes
- Remove support of stylus-loader@^7.0.0, see possible BC breaks in 8.0.0 release notes
- Remove support of webpack-cli@^5.0.0, see possible BC breaks in 6.0.0 release notes
- Remove unmaintained file-loader dependency
The
[N]placeholder (regex capture groups in filename patterns) is no longer supported. If you were using patterns like[1]or[2]in yourEncore.copyFiles()filename option, you will need to restructure your file organization or use a different naming strategy. - Remove deprecated
--httpsflag anddevServerConfig.httpsoption for webpack-dev-server, use--server-type httpsorconfigureDevServerOptions()withserver: 'https'instead
- Update @nuxt/friendly-errors-webpack-plugin to @kocal/friendly-errors-webpack-plugin, a maintained fork of the original plugin
- Update webpack from ^5.74.0 to ^5.82.0
- Update css-minimizer-webpack-plugin to ^8.0.0, see release notes
- Finish removing Vue 2 support leftovers (JSX code path,
vue-jsxfeature,version: 2option, Vue 2 peer dependencies), which was forgotten during v5.0.0
- Add support for Svelte 5
-
Add support for Webpack CLI ^6.0.0
-
Add support for babel-loader ^10.0.0
-
Add support for style-loader ^4.0.0
If you manually specified the option insert, now it can only be a selector or the path to the module.
Follow the style-loader migration guide to upgrade!
- Re-add
webpack-manifest-plugindependency, which was previously embedded in symfony#921
- Add support for @symfony/stimulus-bridge@^4.0.0 by @Kocal in symfony#1361
- #1349 Fix issue between
Encore.enableIntegrityHashes()and filenames with a query-string (@Kocal)
This is a new major version that contains several backwards-compatibility breaks.
-
#1344 Add options configuration callback to
Encore.enableReactPreset()(@Kocal) -
#1345 Add support for integrity hashes when asset names contain a query string (@Kocal)
-
#1321 Drop support of Node.js 19 and 21 (@Kocal)
-
#1307 Drop
webpack-cli4 support, onlywebpack-cli^5.1.4 is supported (@Kocal) -
#1318 Drop webpack-dev-server 4 support, only webpack-dev-server 5 is supported (@Kocal)
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,
}
};
});- #1336 Make
webpack-dev-serverdependency optional (@Kocal)
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
# or
yarn add webpack-dev-server --dev
# or
pnpm install webpack-dev-server --save-dev-
#1308 Drop Vue 2 support (End-Of-Life), only Vue 3 is supported (@Kocal)
-
#1309 Drop ESLint integration (@Kocal)
-
#1313 Drop
clean-webpack-pluginin favor of webpack'soutput.cleanconfiguration. The configuration settings supported byEncore.cleanupOutputBeforeBuildhave changed (@stof) -
#1324 Drop
css-minimizer-webpack-plugin5 support, onlycss-minimizer-webpack-plugin7 is supported (@Kocal) -
#1342 Replace
assets-webpack-plugindependency by an internal plugin, to generateentrypoints.jsonfile (@Kocal) -
#1317 Drop support of sass-loader ^13 and ^14, add support for sass-loader ^16 (@Kocal)
The sass-loader's options have changed, the modern options are now used by default.
Though not recommended,
you must specify the option api: 'legacy'
if you want to keep the legacy options.
For example:
// With the legacy API:
Encore.enableSassLoader((options) => {
options.api = 'legacy';
options.includePaths = [/*...*/];
});
// With the modern API (default):
Encore.enableSassLoader((options) => {
options.loadPaths = [/*...*/];
});- #1319 Drop support of css-loader ^6, add support for css-loader ^7.1 (@Kocal)
Since css-loader 7.0.0,
styles imports became named by default.
It means you should update your code from:
import style from "./style.css";
console.log(style.myClass);to:
import * as style from "./style.css";
console.log(style.myClass);There is also a possibility to keep the previous behavior by configuring the css-loader's modules option:
config.configureCssLoader(options => {
if (options.modules) {
options.modules.namedExport = false;
options.modules.exportLocalsConvention = 'as-is';
}
});Important
If you use CSS Modules inside .vue files,
until vuejs/vue-loader#1909 is merged and released, you will need to restore the previous
behavior by configuring Encore with the code above.
- #1333 Replace
chalkbypicocolors(@Kocal)
-
#1325 Remove no-op argument (@stof)
-
#1327 Fix compat with configuring the devserver server as a string (@stof)
-
#1328 Remove non-existent option in our package-up utility (@stof)
-
#1329 Read the controllers.json as string rather than Buffer (@stof)
-
#1330 Add some types in the internal implementation of Encore (@stof)
-
#1331 test(deps): replace Zombie by Puppeteer (@Kocal)
-
#1332 Upgrade locked dependencies (@stof)
-
#1334 Upgrade the version of stylus used in dev (@stof)
-
#1335 Fix ESLint warning (@stof)
-
#1339 Add PR template (@Kocal)
-
#1343 Add tests for CSS Modules with React and Preact (@Kocal)
-
#1284 Improve ESLint and Babel help messages, when enabling ESLint integration (@Kocal)
-
#1285 Add support for PNPM for installation commands (@Kocal)
-
#1286 Add support for Node.js 22 (@Kocal)
-
#1299 Add support for less-loader 12 (@Kocal)
-
#1301 Add support for postcss-loader 8 (@Kocal)
-
#1302 Add support for stylus-loader 8 (@Kocal)
-
#1295 Add JSX support for Vue 3 (@Kocal)
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'
]
};-
#1278 Deprecate ESLint integration (@Kocal)
-
#1298 Deprecate Vue 2 support (@Kocal)
-
#1275 Update some dev-dependencies to fix vulnerability issues (@Kocal)
-
#1259 Update yarn used for test_apps to latest version (@karpilin)
-
#1297 Upgrade GitHub Actions in CI (@Kocal)
-
#1304 Replace
fast-levenshteinbyfastest-levenshtein(@Kocal) -
#1303 Replace
pkg-upby an inlined solution (@Kocal)
- #1256 Re-adding node 18 support (@weaverryan)
-
#1254 Increased minimum Node version to 20 (@weaverryan)
-
#1253 Allow sass-loader 14 (@cedric-anne)
-
#1247 Allow only configuring a plugin (@gimler)
-
#1235 Dropping support for Node 14 (16 is new min) and allowing
svelte4 (@weaverryan) -
#1185 Bump
babel-loaderfrom 8.2.5 to 9.1.2 (@dppanteon) - the CHANGELOG for babel 9 does not list any breaking changes besides increasing the minimum Node version. -
#1224 Allow fork-ts-checker-webpack-plugin ^8.0 and ^9.0 (@buffcode)
- #1203 upgrade css-minimizer-webpack-plugin from 4 to 5
- #1200 Allow TypeScript 5 (@jmsche)
- #1190 Allow eslint-webpack-plugin ^4.0 (@evertharmeling)
- #1175 Delay force sync until needed (@wesoledi, @weaverryan)
- Allow webpack-cli version 5 to be used in your package.json file
October 17th, 2022
- Add support for Svelte - #781 thanks to @zairigimad
- Support for Vue 2 was accidentally dropped in 4.0.0, and was re-added - #1157 thanks to @Kocal.
This major release makes Encore compatible with Yarn Plug'n'Play and pnpm.
- The following dependencies must be added in your
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- The following dependencies must be removed from your
package.jsonand 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-propertiesand remove it from your Encore configuration:
Encore.configureBabel((options) => {
- config.plugins.push('@babel/plugin-proposal-class-properties');
+
})August 24th, 2022
- Add vue 2.7 feature to allow dropping
vue-template-compiler- #1134 thanks to @billyct
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-plugin3.4 -> 4.0 (4.0 just drops Node 12 support)less-loader10 -> 11postcss-loader6 -> 7sass-loader12 -> 13stylus0.57 -> 0.58stylus-loader6 -> 7
If 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).
- #1133 - Increasing dependencies - @weaverryan
- #1125 - Changing to support the "server" options object for webpack-dev-server - @weaverryan
- #1122 - Allow sass-loader:^13.0.0, require node >= 14 - @jmsche
- #1118 - Use cli param server-type to define devServer https mode - @thegillou
May 5th, 2022
- #1093 - Allow sass-embedded - @IonBazan
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-pluginVersion3to4: dropped old Node & Webpack version supportcss-loaderVersion5to6: dropped old Node version support & CHANGELOGcss-minimizer-webpack-pluginVersion2to3: dropped old Node version supportloader-utilsREMOVEDmini-css-extract-pluginVersion1.5to2.2.1: dropped old Node & Webpack version support & CHANGELOGpretty-errorVersion3.0to4.0: dropped old Node version supportresolve-url-loaderVersion3.0to5.0: dropped old Node version support, requires postcss^8.0, removereworkengine & CHANGELOGstyle-loaderVersion2to3: dropped old Node and Webpack version support & CHANGELOGyargs-parserVersion20.2to21: dropped old Node version support
Additionally, Encore changed the supported versions of the following packages, which you may have installed to enable extra features:
-
eslintMinimum version increased from7to8 -
eslint-webpack-pluginMinimum version increased from2.5to3 -
fork-ts-checker-webpack-pluginMinimum version increased from5to6CHANGELOG -
less-loaderMinimum version increased from7to10 -
postcss-loaderMinimum version increased from4to6 -
preactMinimum version increased from8to10CHANGELOG -
sass-loaderMinimum version increased from9to12 -
stylusMinimum version increased from0.54to0.56 -
stylus-loaderMinimum version increased from3to6CHANGELOG -
vue-loaderMinimum version increased from16to17CHANGELOG -
Removed
Encore.enableEslintLoader(): useEncore.enableEslintPlugin(). -
If using
enableEslintPlugin()with the@babel/eslint-parserparser, you may now need to create an external Babel configuration file. To see an example, temporarily delete your.eslintrc.jsfile and run Encore. The error will show you a Babel configuration file you can use. -
With
configureDefinePlugin(), theoptions['process.env']key format passed to the callback has changed (see #960). If you are usingconfigureDefinePlugin()to add more items toprocess.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');
})Mar 17th, 2022
- #1095 - bug #1095 Revert removing public option from dev-server - @louismariegaborit
Jan 21st, 2022
- #1076 - fix: lazy-load ESLint plugin dependency, fix #1075 - @Kocal
Jan 20th, 2022
- #985 - Move from eslint-loader to eslint-webpack-plugin - @Kocal
- #1070 - New Encore method for adding multiple entries at once - @shmolf
- #1074 - Support AVIF images - @benbankes
Jan 20th, 2022
- #1069 - Increased webpack-cli version constraint to v.4.9.1 - @nspyke
Dec 2nd, 2021
Dependency changes:
- Official support for
ts-loader8 was dropped. - Official support for
typescript3 was dropped and minimum increased to 4.2.2. - Official support for
vuewas bumped to 3.2.14 or higher. - Official support for
vue-loaderwas bumped to 16.7.0 or higher.
- #1062 - Allowing @hotwired/stimulus, allowing @symfony/stimulus-bridge 3, dropping v1. - @weaverryan
- #1058 - Fix deprecated public option failure for webpack-dev-server - @atesca09
Sep 3rd, 2021
- #1031 - changing position of host option for webpack-dev-server - @weaverryan
Aug 31st, 2021
June 18th, 2021
- #1000 - Allow ts-loader ^9.0.0, close #993 - @Kocal
- #999 - Allow sass-loader ^12.0.0, close #996 - @Kocal
May 31st, 2021
- #983 - Allow less-loader v9 - @bobvandevijver
- #979 - #936: Fix manifest key problem when using copy files - @bobvandevijver
May 11th, 2021
- #976 - Change friendly-errors-webpack-plugin to
@nuxt/friendly-errors-webpack-plugin - @hailwood
- #975 - Resolve security issue CVE-2021-23369 - @elghailani
May 3rd, 2021
- #968 - Locking assets-webpack-plugin to less than 7.1.0 - @weaverryan
- #966 - Upgrade to css-minimize-webpack-plugin 2.0 - @stof
- #963 - feat: add Encore.when() - @Kocal
- #943 - Do not allow webpack-dev-server to find an open port - @weaverryan
March 1st, 2021
- #939 - fixing 2 issues related to webpack-dev-server and HMR - @weaverryan
- #938 - Require vue-loader 15.9.5 to work with Encore 1.0 - @weaverryan
February 19th, 2021
- #930 - Fix Encore.copyFiles() when copying images/fonts - @Lyrkan
February 12th, 2021
- #929 - Allowing stylus-loader 5 - @weaverryan
- #928 - allowing sass-loader 11 - @weaverryan
- #918 - Allowing new postcss-loader and less-loader - @weaverryan
February 12th, 2021
- #921 - Fixing manifest paths (by temporarily embedding webpack-manifest-plugin fix) - @weaverryan
February 6th, 2021
- #917 - Re-working dev-server and https detection - @weaverryan
February 2nd, 2021
- #910 - Fix stimulus version bug - @weaverryan
January 31st, 2021
- #905 - Omit cache key entirely when build cache is disabled - @weaverryan
January 29th, 2021
- #902 - next stimulus-bridge will actually be 2.0 - @weaverryan
- #901 - Working around missing manifest.json bug - @weaverryan
January 29th, 2021
- #899 - Fixing support for webpack-dev-server v4 - @weaverryan
January 27th, 2021
- #892 - Prep for 1.0: upgrading all outdated dependencies - @weaverryan
- #889 - bumping preset-env to version that depends on @babel/plugin-proposal-class-properties - @weaverryan
- #888 - updating stimulus-bridge plugin to work with proposed new loader - @weaverryan
- #887 - Bump less 4 and less loader 7 - @VincentLanglet
- #884 - [Webpack 5] Adding new enableBuildCache() method for Webpack 5 persistent caching - @weaverryan
- #883 - Updating images and fonts to use Webpack 5 Asset modules - @weaverryan
- #878 - [Webpack5] Using old watchOptions regexp & removing Node 13 support - @weaverryan
- #645 - Update Webpack to v5 (+ other dependencies) - @Lyrkan
December 3rd, 2020
- #870 - Prefer sass over node-sass - @weaverryan
- #869 - Upgrade Vue3 deps beyond beta - @weaverryan
- #865 - Bump sass-loader to ^10.0.0 - @weaverryan
- #854 - Updates postcss loader to v4 - @railto
- #831 - Validator should allow copyFiles() without other entries. - @pszalko
- #800 - ⬆️ Upgraded ts-loader to ^8.0.1 - @skmedix
- #774 - feat: add support for ESLint 7, drop support ESLint 5 - @Kocal
- #756 - Add a boolean parameter to Encore.disableCssExtraction() - @football2801
December 3rd, 2020
- #863 - fix(stimulus): don't require an optional dependency if it's not used - @Kocal
December 3rd, 2020
- #859 - Implement Stimulus bridge configurator - @tgalopin
December 3rd, 2020
- #848 - Update resolve-url-loader to fix prototype pollution - @Khartir
September 10th, 2020
- #832 - Update assets-webpack-plugin to ^5.1.1 - @cilefen
May 14th, 2020
- #772 - Setting CleanWebpackPlugin's cleanStaleWebpackAssets: false - @weaverryan
May 13th, 2020
- #769 - Reverting change to only package vue runtime loader - @weaverryan
May 11th, 2020
- #763 - Removing vue2 alias to use the full build - @weaverryan
- #760 - upgrading to clean-webpack-plugin 3.0 - @weaverryan
- #759 - upgrading fork-ts-checker-webpack-plugin to test 4.0 - @weaverryan
- #758 - Feat/sass loader 8 - @weaverryan
- #746 - Added Vue3 support - @weaverryan
- #765 - Fixing babel.config.js filename in message - @weaverryan
- #752 - Upgrade yargs-parser - @stof
- #739 - Resolve loaders directly from Encore instead of using their names - @Lyrkan
- #738 - Fix babel config file detection - @jdreesen
April 18th, 2020
- #732 - feat: add ESLint 6 support - @Kocal
April 17th, 2020
- #731 - Upgrade file-loader and allowed version for url-loader, drop Node 8 support - @weaverryan
- #729 - bumping to css-loader v3 - @weaverryan
- #718 - Include the .pcss extension for PostCSS files - @opdavies
- #715 - Added the possibility to configure the StyleLoader via the method Enc… - @tooltonix
- #710 - bump: style-loader version 1.X - @Grafikart
- #694 - Add Encore.enableBabelTypeScriptPreset() to "compile" TypeScript with Babel - @Kocal
- #693 - Add a way to configure devServer options - @Kocal
- #687 - Remove ESLint user-related config - @Kocal
- #680 - Add Encore.addCacheGroup() method and depreciate Encore.createSharedEntry() - @Lyrkan
- #574 - Proposal to replace #504 (ESLint/Vue) - @Kocal
- #649 - Allow to use the [N] placeholder in copyFiles() - @Lyrkan
February 24th, 2020
- #697 - Fix source maps being generated by default in dev - @Lyrkan
-
Don't make
@babel/preset-envuseforceAllTransformsoption 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.postcssor usinglang="postcss"in Vue - #594 thanks to @Lyrkan. -
Allow
resolve-url-loaderto be configured viaenableSassLoader()- #603 thanks to @diegocardoso93. -
Support was removed from Node 9 (a no-longer-supported version of Node) - #585 thanks to @weaverryan
-
[BC Break] Removed the ability to use
[chunkhash]inconfigureFilenames(), which was already deprecated and no longer reliable - #608 thanks to @Lyrkan.
-
[Behavior Change] The Babel configuration
sourceTypedefault was changed from not being specified (so, the defaultmodulewas used) tounambiguous. This is to help Babel'suseBuiltInsfunctionality properly determine if arequireorimportshould 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.jsto add better docs and better IDE auto-completion - #550 thank sto @Lyrkan.
-
[Behavior change] The Babel
useBuiltInsoption default value changed fromentrytofalse, which means that polyfills may no longer be provided in the same way. This is due to a change in Babel and core-js. To get the same functionality back, runyarn add core-js --dev, then use:Encore.configureBabel(() => {}, { useBuiltIns: 'entry', // or try "usage" corejs: 3 })
This comes from #545 thanks to @Lyrkan.
-
Added the ability to "resolve" CSS and Sass files without specifying the file extension and by taking advantage of the
sassorstyleattribute in an npm package. For example, you can now import the main Bootstrap SASS file from within a SASS file by saying@import ~bootstrap. This will use thesassattribute from the bootstrappackage.jsonfile to find which file to load. #474 thanks to @deAtog. -
Added a new
Encore.enableIntegrityHashes(), which will cause a newintegritykey to be added toentrypoints.jsonwith integrity values that can be included in thescriptorlinktag for that asset - #522 thanks to @Lyrkan. -
Allow some parts of
configureBabel()to be used, even if there is an external.babelrcconfiguration file - #544 thanks to @Lyrkan.
-
[BC BREAK] Various dependency versions were updated, including
css-loaderupdated from^1.0.0to^2.1.1andresolve-url-loaderupdated from^2.3.0to^3.0.1. The minimum Node version was also bumped from 6 to 8. See #540 for more details. -
Added
Encore.disableCssExtraction()if you prefer your CSS to be output via thestyle-loader- #539 thank to @Lyrkan. -
Added
Encore.configureLoaderRule()as a way to configure the loader config that Encore normally handles - #509 thanks to @Kocal. -
Babel cache is no longer used for production builds to avoid a bug where the cache prevents browserslist from being used - #516 thanks to @Lyrkan.
-
Add CSS modules support in Vue.js for Sass/Less/Stylus - #511 thanks to @Lyrkan
-
Allow to use Dart Sass instead of Node Sass - #517 thanks to @Lyrkan
-
Allow to set a custom context in copyFiles - #518 thanks to @Lyrkan
-
Improve 'Install x to use y' and 'Unrecognized method' error messages - #520 thanks to @Lyrkan
-
Allow to set @babel/preset-env's useBuiltIns option - #521 thanks to @Lyrkan
-
Allow setOutputPath to create nested directories - #525 thanks to @Lyrkan
-
Add support for CSS modules in Vue - #508 thanks to @Lyrkan
-
Store externals in an array - #495 thanks to @deAtog
-
Add
Encore.isRuntimeEnvironmentConfigured()- #500 thanks to @stof. -
Add the ability to configure watch options - #486 thanks to @Kocal
-
Enabled cache and parallelism for terser for faster builds - #497 thanks to @Kocal
- [BC BREAK] The values/paths in entrypoints.json were previously
stripped of their opening slash. That behavior has been changed:
the opening slash is now included: Before:
build/foo.js, After:/build/foo.js.
-
[BC BREAK] Webpack was upgraded to version 4. This includes a number of major and minor changes. The changes are listed below under the
Webpack 4 Upgradesection. -
[BC BREAK] The
createSharedEntry()no longer can be passed an array of files. Instead, set this to just one file, and require the other files from inside that file. -
[DEPRECATION] You must now call either
Encore.enableSingleRuntimeChunk()orEncore.disableSingleRuntimeChunk(): not calling either method is deprecated. The recommended setting isEncore.enableSingleRuntimeChunk(). This will cause a newruntime.jsfile to be created, which must be included on your page with a script tag (before any other script tags for Encore JavaScript files). See the documentation aboveenableSingleRuntimeChunk()inindex.jsfor more details. -
[BEHAVIOR CHANGE] Previously, without any config, Babel was configured to "transpile" (i.e. re-write) your JavaScript so that it was compatible with all browsers that currently have more than 1% of the market share. The new default behavior is a bit more aggressive, and may rewrite even more code to be compatible with even older browsers. The recommendation is to add a new
browserslistkey to yourpackage.jsonfile that specifies exactly what browsers you need to support. For example, to get the old configuration, add the following topackage.json:
{
"browserslist": "> 1%"
}See the browserslist library for a full description of all of the valid browser descriptions.
-
Added a new
copyFiles()method that is able to copy static files into your build directory and allows them to be versioned. #409 thanks to @Lyrkan -
Introduced a new
configureSplitChunks()method that can be used to further configure theoptimizations.splitChunksconfiguration. -
A new
entrypoints.jsonfile is now always output. For expert use-cases, theoptimizations.splitChunks.chunksconfiguration can be set viaconfigureSplitChunks()toall. Then, you can write some custom server-side code to parse theentrypoints.jsso that you know whichscriptandlinktags are needed for each entry. -
The "dynamic import" syntax is now supported out of the box because the
@babel/plugin-syntax-dynamic-importbabel plugin is always enabled. This allows you to do "Dynamic Imports" as described here: https://webpack.js.org/guides/code-splitting/#dynamic-imports -
A new "version check" system was added for optional dependencies. Now, when you install optional plugins to support a feature, if you are using an unsupported version, you will see a warning. "Package recommendation" errors (i.e. when you enable a feature but you are missing some packages) will also contain the version in the install string when necessary (e.g.
yarn add foo@^2.0). -
Support was added
handlebars-loaderby callingenableHandlebarsLoader(). #301 thanks to @ogiammetta -
Support was added for
eslint-loaderby callingenableEslintLoader(). #243 thanks to @pinoniq -
The
css-loadercan now be configured by callingconfigureCssLoader(). #335 thanks to @XWB -
It's now possible to control the
excludefor Babel so that you can process certain node_modules packages through Babel - use the new second argument toconfigureBabel()- #401 thanks to @Lyrkan.
-
Node 7 is no longer supported. This is because the new
mini-css-extract-plugindoes not support it (and neither) does Yarn. -
For Preact, the necessary plugin the user needs to install changed from
babel-plugin-transform-react-jsxto@babel/plugin-transform-react-jsx. -
The NamedModulesPlugin was removed.
-
The
babel-preset-envpackage (which was at version ^1.2.2) was removed in favor of@babel/preset-env. -
ExtractTextPlugin was removed and replaced with mini-css-extract-plugin. Accordingly,
extractTextPluginOptionsCallback()was removed. -
Support for CoffeeScript was entirely removed.
-
Actual lang="sass" no longer works for Vue. However, lang="scss" continues to work fine.
-
uglifyjs-webpack-plugin was replaced by terser-webpack-plugin. If you're using
configureUglifyJsPlugin(), please switch toconfigureTerserPlugin()instead.
- Upgraded webpack-manifest-plugin from 2.0.0 RC1 to ^2.0.0. The original RC version was not meant to be used in a release. #306 via @weaverryan
-
Added
Encore.configureUrlLoader()method that allows you to inline smaller images/file assets for better performance #296 via @Lyrkan -
Improved error messages that recommend using yarn vs npm #291 via @Lyrkan
-
Fixed bug with using --stats option #299 via @Lyrkan
-
Allow configuration callbacks to return their value #300 via @Lyrkan
-
Updated to use the new v2 of webpack-manifest-plugin #164 via @weaverryan
- Updated how Encore is exported to support better IDE auto-completion #263 via @florentdestremau
-
Added
Encore.addAliases()andEncore.addExternal()shortcut methods #217 via @Lyrkan -
Fixed hash lengths - normalized all to 8 - #216 via @Lyrkan
-
Added CoffeeScript loader - #201 via @harentius
-
Added build notifications by calling
Encore.enableBuildNotifications()- #190 via @Lyrkan -
Added Stylus support via
Encore.enableStylusLoader()- #195 via @mneuhaus
-
Added a priority argument to the
addPlugin()method so that we can (mostly in the future) allow plugins to be ordered, if/when that becomes necessary - #177 via @Lyrkan -
Fixed several minor bugs related to extra
.mapfiles (#170), always having a DefinePlugin enabled (#172), fixing extra instances of the ts-loader (#181) and upgrading a dependency to avoid a deprecation warning (#182) - all via @Lyrkan
-
Fixed bug with using
?in your versioning strategy withaddStyleEntry- #161 via @Lyrkan -
Fixed bug when using
webpack.config.babel.jswith ES6 imports - #167 via @Lyrkan
-
Add support for Preact - #144 via @Lyrkan
-
Added
Encore.configureManifestPlugin()method - #142 via @Seikyo -
Added 5 new methods to configure plugins! #152 via @Lyrkan
Encore.configureDefinePlugin()Encore.configureExtractTextPlugin()Encore.configureFriendlyErrorsPlugin()Encore.configureLoaderOptionsPlugin()Encore.configureUglifyJsPlugin()
-
Added
Encore.configureFilenames()so that you can fully control the filename patterns for all types of files - #137 via @Lyrkan -
Added
Encore.configureRuntimeEnvironment(), which is useful if you need to requirewebpack.config.jsfrom some non-Encore process (e.g. Karma) - #115 via @Lyrkan
-
[BEHAVIOR CHANGE] Image and font files now always include a hash in their filename, and the hash is shorter - #110 via @Lyrkan
-
Fixed a bug that caused extra comments to be in the final production compiled JavaScript - #132 via @weaverryan
-
Encore.enablePostCssLoader()now accepts an options callback - #130 via @Lyrkan -
Encore.enableLessLoader()now accepts an options callback - #134 via @Lyrkan -
Added
Encore.enableForkedTypeScriptTypesChecking()to enable fork-ts-checker-webpack-plugin for faster typescript type checking - #101 via @davidmpaz -
Added
Encore.disableImagesLoader()andEncore.disableFontsLoader()to totally disable thefile-loaderrules for images and fonts - #103 via @Lyrkan
-
Fixed a bug with webpack 3.4.0 ("Can't resolve dev") - #114.
-
Added
--keep-public-pathoption todev-serverthat allows you to specify that you do not want yourpublicPathto automatically point at the dev-server URL. Also relaxed the requirements when usingdev-serverso that you can now specify a custom, fully-qualifiedpublicPathURL - #96 -
Fixed bug where
@importCSS wouldn't use postcss - #108
- The
webpackpackage was upgraded from version 2.2 to 3.1 #53. Theextract-text-webpack-pluginpackage was also upgraded from 2.1 to 3.0.
-
[BC BREAK] If you're using
enableSassLoader()AND passing an options array, the options now need to be moved to the second argument:// before .enableSassLoader({ resolve_url_loader: true }); // after enableSassLoader(function(sassOptions) {}, { resolve_url_loader: true })
-
Allowing typescript options callback to be optional - #75
-
Allow the Encore singleton to be reset - #83
-
Fixing bug with vue-loader and sass - #89
- Syntax error fix - #64
-
[BEHAVIOR CHANGE] When using
autoProvidejQuery(),window.jQueryis now also included (and so will be re-written in the compiled files). If you're also exposingjQueryas a global variable, you'll need to update your code:// Before: if you had this window.jQuery = require('jquery'); // After: change to this global.jQuery = require('jquery');
-
Vue.js support! See #49
-
Typescript support! See #50
-
Windows support fixed #28
-
Added
Encore.addPlugin()#19 -
Added
Encore.addLoader()#11 -
Encore.cleanupOutputBeforeBuild()now empties the directory instead or removing it.