Changelog History
Page 6
-
v0.27.0 Changes
April 10, 2019๐ Zoinks! Another release is ready!
โฌ๏ธ To upgrade:
โก๏ธ Update your
package.jsonfile: set the@symfony/webpack-encoreversion to^0.27.0.โฌ๏ธ Run
yarn upgrade!๐ Changes: v0.26.0..v0.27.0
๐ Documentation: http://symfony.com/doc/current/frontend.html
Highlights:
๐ง [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.Happy packing!
-
v0.26.0 Changes
- [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.
- [Behavior change] The Babel
-
v0.25.0 Changes
[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.
-
v0.24.0 Changes
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
-
v0.23.0 Changes
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
-
v0.22.0 Changes
- [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] 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:
-
v0.21.0 Changes
[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 @LyrkanIntroduced 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-importsA 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.
-
v0.20.1 Changes
- 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
-
v0.20.0 Changes
Added
Encore.configureUrlLoader()method that allows you to inline smaller images/file assets for better performance296 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
-
v0.19.0 Changes
- Updated how Encore is exported to support better IDE auto-completion #263 via @florentdestremau