From 30a48f2818559a86c4a5383ff95f59bf7abac785 Mon Sep 17 00:00:00 2001 From: PabloKowalczyk <11366345+PabloKowalczyk@users.noreply.github.com> Date: Sun, 27 Oct 2019 09:31:33 +0100 Subject: [PATCH 1/5] Add new options to "webpack_encore.yaml" --- symfony/webpack-encore-bundle/1.6/assets | 1 + .../1.6/config/packages/assets.yaml | 1 + .../1.6/config/packages/prod | 1 + .../1.6/config/packages/webpack_encore.yaml | 26 +++++++++++++++++++ .../webpack-encore-bundle/1.6/manifest.json | 1 + .../webpack-encore-bundle/1.6/package.json | 1 + .../1.6/webpack.config.js | 1 + 7 files changed, 32 insertions(+) create mode 120000 symfony/webpack-encore-bundle/1.6/assets create mode 120000 symfony/webpack-encore-bundle/1.6/config/packages/assets.yaml create mode 120000 symfony/webpack-encore-bundle/1.6/config/packages/prod create mode 100644 symfony/webpack-encore-bundle/1.6/config/packages/webpack_encore.yaml create mode 120000 symfony/webpack-encore-bundle/1.6/manifest.json create mode 120000 symfony/webpack-encore-bundle/1.6/package.json create mode 120000 symfony/webpack-encore-bundle/1.6/webpack.config.js diff --git a/symfony/webpack-encore-bundle/1.6/assets b/symfony/webpack-encore-bundle/1.6/assets new file mode 120000 index 00000000..4dec183c --- /dev/null +++ b/symfony/webpack-encore-bundle/1.6/assets @@ -0,0 +1 @@ +../1.0/assets \ No newline at end of file diff --git a/symfony/webpack-encore-bundle/1.6/config/packages/assets.yaml b/symfony/webpack-encore-bundle/1.6/config/packages/assets.yaml new file mode 120000 index 00000000..7cb51332 --- /dev/null +++ b/symfony/webpack-encore-bundle/1.6/config/packages/assets.yaml @@ -0,0 +1 @@ +../../../1.0/config/packages/assets.yaml \ No newline at end of file diff --git a/symfony/webpack-encore-bundle/1.6/config/packages/prod b/symfony/webpack-encore-bundle/1.6/config/packages/prod new file mode 120000 index 00000000..bc7768cf --- /dev/null +++ b/symfony/webpack-encore-bundle/1.6/config/packages/prod @@ -0,0 +1 @@ +../../../1.0/config/packages/prod \ No newline at end of file diff --git a/symfony/webpack-encore-bundle/1.6/config/packages/webpack_encore.yaml b/symfony/webpack-encore-bundle/1.6/config/packages/webpack_encore.yaml new file mode 100644 index 00000000..bbe4dd3d --- /dev/null +++ b/symfony/webpack-encore-bundle/1.6/config/packages/webpack_encore.yaml @@ -0,0 +1,26 @@ +webpack_encore: + # The path where Encore is building the assets - i.e. Encore.setOutputPath() + output_path: '%kernel.project_dir%/public/build' + # If multiple builds are defined (as shown below), you can disable the default build: + # output_path: false + + # if using Encore.enableIntegrityHashes() and need the crossorigin attribute (default: false, or use 'anonymous' or 'use-credentials') + # crossorigin: 'anonymous' + + # preload all rendered script and link tags automatically via the http2 Link header + # preload: true + + # Throw an exception if the entrypoints.json file is missing or an entry is missing from the data + # strict_mode: false + + # if you have multiple builds: + # builds: + # pass "frontend" as the 3rg arg to the Twig functions + # {{ encore_entry_script_tags('entry1', null, 'frontend') }} + + # frontend: '%kernel.project_dir%/public/frontend/build' + + # Cache the entrypoints.json (rebuild Symfony's cache when entrypoints.json changes) + # Available in version 1.2 + # Put in config/packages/prod/webpack_encore.yaml + # cache: true diff --git a/symfony/webpack-encore-bundle/1.6/manifest.json b/symfony/webpack-encore-bundle/1.6/manifest.json new file mode 120000 index 00000000..3abdbe32 --- /dev/null +++ b/symfony/webpack-encore-bundle/1.6/manifest.json @@ -0,0 +1 @@ +../1.0/manifest.json \ No newline at end of file diff --git a/symfony/webpack-encore-bundle/1.6/package.json b/symfony/webpack-encore-bundle/1.6/package.json new file mode 120000 index 00000000..cc120ece --- /dev/null +++ b/symfony/webpack-encore-bundle/1.6/package.json @@ -0,0 +1 @@ +../1.0/package.json \ No newline at end of file diff --git a/symfony/webpack-encore-bundle/1.6/webpack.config.js b/symfony/webpack-encore-bundle/1.6/webpack.config.js new file mode 120000 index 00000000..0eb7084a --- /dev/null +++ b/symfony/webpack-encore-bundle/1.6/webpack.config.js @@ -0,0 +1 @@ +../1.0/webpack.config.js \ No newline at end of file From 99026bfaaa79e40f195210203b3f2410e90fc3c0 Mon Sep 17 00:00:00 2001 From: PabloKowalczyk <11366345+PabloKowalczyk@users.noreply.github.com> Date: Sun, 27 Oct 2019 09:31:49 +0100 Subject: [PATCH 2/5] Disable strict_mode in test environment --- .../1.6/config/packages/test/webpack_encore.yaml | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 symfony/webpack-encore-bundle/1.6/config/packages/test/webpack_encore.yaml diff --git a/symfony/webpack-encore-bundle/1.6/config/packages/test/webpack_encore.yaml b/symfony/webpack-encore-bundle/1.6/config/packages/test/webpack_encore.yaml new file mode 100644 index 00000000..9ad96735 --- /dev/null +++ b/symfony/webpack-encore-bundle/1.6/config/packages/test/webpack_encore.yaml @@ -0,0 +1,2 @@ +webpack_encore: + strict_mode: false From ca6e14d53474dc1892faccb27ea3657f79ca1fc5 Mon Sep 17 00:00:00 2001 From: PabloKowalczyk <11366345+PabloKowalczyk@users.noreply.github.com> Date: Fri, 1 Nov 2019 07:34:48 +0100 Subject: [PATCH 3/5] Remove "available in version" comment --- .../1.6/config/packages/webpack_encore.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/symfony/webpack-encore-bundle/1.6/config/packages/webpack_encore.yaml b/symfony/webpack-encore-bundle/1.6/config/packages/webpack_encore.yaml index bbe4dd3d..1cbe7390 100644 --- a/symfony/webpack-encore-bundle/1.6/config/packages/webpack_encore.yaml +++ b/symfony/webpack-encore-bundle/1.6/config/packages/webpack_encore.yaml @@ -21,6 +21,5 @@ webpack_encore: # frontend: '%kernel.project_dir%/public/frontend/build' # Cache the entrypoints.json (rebuild Symfony's cache when entrypoints.json changes) - # Available in version 1.2 # Put in config/packages/prod/webpack_encore.yaml # cache: true From 38c3d4c6317e528872d1f8892d787d8427de115f Mon Sep 17 00:00:00 2001 From: PabloKowalczyk <11366345+PabloKowalczyk@users.noreply.github.com> Date: Fri, 1 Nov 2019 07:35:09 +0100 Subject: [PATCH 4/5] Indent correctly --- .../1.6/config/packages/webpack_encore.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/symfony/webpack-encore-bundle/1.6/config/packages/webpack_encore.yaml b/symfony/webpack-encore-bundle/1.6/config/packages/webpack_encore.yaml index 1cbe7390..9191f4f4 100644 --- a/symfony/webpack-encore-bundle/1.6/config/packages/webpack_encore.yaml +++ b/symfony/webpack-encore-bundle/1.6/config/packages/webpack_encore.yaml @@ -15,10 +15,10 @@ webpack_encore: # if you have multiple builds: # builds: - # pass "frontend" as the 3rg arg to the Twig functions - # {{ encore_entry_script_tags('entry1', null, 'frontend') }} + # pass "frontend" as the 3rg arg to the Twig functions + # {{ encore_entry_script_tags('entry1', null, 'frontend') }} - # frontend: '%kernel.project_dir%/public/frontend/build' + # frontend: '%kernel.project_dir%/public/frontend/build' # Cache the entrypoints.json (rebuild Symfony's cache when entrypoints.json changes) # Put in config/packages/prod/webpack_encore.yaml From 7e5e646dd6afcf50a306ccae92ee14cef691f29f Mon Sep 17 00:00:00 2001 From: PabloKowalczyk <11366345+PabloKowalczyk@users.noreply.github.com> Date: Fri, 1 Nov 2019 07:36:48 +0100 Subject: [PATCH 5/5] By default do not disable "strict_mode" for tests but leave it commented to fast change --- .../1.6/config/packages/test/webpack_encore.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/symfony/webpack-encore-bundle/1.6/config/packages/test/webpack_encore.yaml b/symfony/webpack-encore-bundle/1.6/config/packages/test/webpack_encore.yaml index 9ad96735..02a76515 100644 --- a/symfony/webpack-encore-bundle/1.6/config/packages/test/webpack_encore.yaml +++ b/symfony/webpack-encore-bundle/1.6/config/packages/test/webpack_encore.yaml @@ -1,2 +1,2 @@ -webpack_encore: - strict_mode: false +#webpack_encore: +# strict_mode: false