From e8b4f0689ca150ca7b786eb690aa98ef28b1a648 Mon Sep 17 00:00:00 2001 From: Lyrkan <850046+Lyrkan@users.noreply.github.com> Date: Wed, 27 Mar 2019 14:16:28 +0100 Subject: [PATCH 1/2] Encore: Make @babel/preset-env use polyfills by default --- symfony/webpack-encore-bundle/1.0/package.json | 3 ++- symfony/webpack-encore-bundle/1.0/webpack.config.js | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/symfony/webpack-encore-bundle/1.0/package.json b/symfony/webpack-encore-bundle/1.0/package.json index a851d847..b49d852a 100644 --- a/symfony/webpack-encore-bundle/1.0/package.json +++ b/symfony/webpack-encore-bundle/1.0/package.json @@ -1,6 +1,7 @@ { "devDependencies": { - "@symfony/webpack-encore": "^0.22.0", + "@symfony/webpack-encore": "^0.26.0", + "core-js": "^3.0.0", "webpack-notifier": "^1.6.0" }, "license": "UNLICENSED", diff --git a/symfony/webpack-encore-bundle/1.0/webpack.config.js b/symfony/webpack-encore-bundle/1.0/webpack.config.js index 2f7e205c..cb4356e0 100644 --- a/symfony/webpack-encore-bundle/1.0/webpack.config.js +++ b/symfony/webpack-encore-bundle/1.0/webpack.config.js @@ -41,6 +41,12 @@ Encore // enables hashed filenames (e.g. app.abc123.css) .enableVersioning(Encore.isProduction()) + // enables @babel/preset-env polyfills + .configureBabel(() => {}, { + useBuiltIns: 'usage', + corejs: 3 + }) + // enables Sass/SCSS support //.enableSassLoader() From 03057a80511671c7553d4931543062818d787986 Mon Sep 17 00:00:00 2001 From: Ryan Weaver Date: Fri, 29 Mar 2019 10:17:49 -0400 Subject: [PATCH 2/2] adding enableIntegrityHashes() --- symfony/webpack-encore-bundle/1.0/webpack.config.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/symfony/webpack-encore-bundle/1.0/webpack.config.js b/symfony/webpack-encore-bundle/1.0/webpack.config.js index cb4356e0..d85c6c4f 100644 --- a/symfony/webpack-encore-bundle/1.0/webpack.config.js +++ b/symfony/webpack-encore-bundle/1.0/webpack.config.js @@ -53,6 +53,10 @@ Encore // uncomment if you use TypeScript //.enableTypeScriptLoader() + // uncomment to get integrity="..." attributes on your script & link tags + // requires WebpackEncoreBundle 1.4 or higher + //.enableIntegrityHashes() + // uncomment if you're having problems with a jQuery plugin //.autoProvidejQuery()