From eb7e0f4e5aeffe926ef54093df0af34cc835bc5a Mon Sep 17 00:00:00 2001 From: Ryan Weaver Date: Sun, 9 Sep 2018 14:01:44 -0400 Subject: [PATCH] Adding recipe for symfony/webpack-encore-bundle --- .../1.0/config/packages/webpack_encore.yaml | 4 ++++ symfony/webpack-encore-bundle/1.0/manifest.json | 5 +++++ symfony/webpack-encore-pack/1.0/webpack.config.js | 4 ++++ 3 files changed, 13 insertions(+) create mode 100644 symfony/webpack-encore-bundle/1.0/config/packages/webpack_encore.yaml create mode 100644 symfony/webpack-encore-bundle/1.0/manifest.json diff --git a/symfony/webpack-encore-bundle/1.0/config/packages/webpack_encore.yaml b/symfony/webpack-encore-bundle/1.0/config/packages/webpack_encore.yaml new file mode 100644 index 00000000..2075d6be --- /dev/null +++ b/symfony/webpack-encore-bundle/1.0/config/packages/webpack_encore.yaml @@ -0,0 +1,4 @@ +webpack_encore: + # The path where Encore is building the assets. + # This should match Encore.setOutputPath() in webpack.config.js. + output_path: '%kernel.public_dir%/build' diff --git a/symfony/webpack-encore-bundle/1.0/manifest.json b/symfony/webpack-encore-bundle/1.0/manifest.json new file mode 100644 index 00000000..e164c6e6 --- /dev/null +++ b/symfony/webpack-encore-bundle/1.0/manifest.json @@ -0,0 +1,5 @@ +{ + "copy-from-recipe": { + "config/": "%CONFIG_DIR%/" + } +} diff --git a/symfony/webpack-encore-pack/1.0/webpack.config.js b/symfony/webpack-encore-pack/1.0/webpack.config.js index d66323de..5c3109eb 100644 --- a/symfony/webpack-encore-pack/1.0/webpack.config.js +++ b/symfony/webpack-encore-pack/1.0/webpack.config.js @@ -21,6 +21,10 @@ Encore //.addEntry('page1', './assets/js/page1.js') //.addEntry('page2', './assets/js/page2.js') + // will require an extra script tag for runtime.js + // but, you probably want this, unless you're building a single-page app + .enableSingleRuntimeChunk() + /* * FEATURE CONFIG *