From 4902bfab392e744704dc960e32ee6992d7e51bcc Mon Sep 17 00:00:00 2001 From: Hugues Tavernier Date: Thu, 22 Jun 2023 11:07:41 +0200 Subject: [PATCH] update pentatrion/vite-bundle manifest add-lines --- pentatrion/vite-bundle/1.0/manifest.json | 18 +++++++++++++++++- pentatrion/vite-bundle/1.0/post-install.txt | 6 ++---- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/pentatrion/vite-bundle/1.0/manifest.json b/pentatrion/vite-bundle/1.0/manifest.json index 528186cb0..a73261afb 100644 --- a/pentatrion/vite-bundle/1.0/manifest.json +++ b/pentatrion/vite-bundle/1.0/manifest.json @@ -10,5 +10,21 @@ "copy-from-recipe": { "config/": "%CONFIG_DIR%/" }, - "gitignore": ["/node_modules/", "/%PUBLIC_DIR%/build/"] + "gitignore": ["/node_modules/", "/%PUBLIC_DIR%/build/"], + "add-lines": [ + { + "file": "templates/base.html.twig", + "content": " {{ vite_entry_script_tags('app') }}", + "position": "after_target", + "target": "{% block javascripts %}", + "warn_if_missing": true + }, + { + "file": "templates/base.html.twig", + "content": " {{ vite_entry_link_tags('app') }}", + "position": "after_target", + "target": "{% block stylesheets %}", + "warn_if_missing": true + } + ] } diff --git a/pentatrion/vite-bundle/1.0/post-install.txt b/pentatrion/vite-bundle/1.0/post-install.txt index 511d245b2..c94b48068 100644 --- a/pentatrion/vite-bundle/1.0/post-install.txt +++ b/pentatrion/vite-bundle/1.0/post-install.txt @@ -6,8 +6,6 @@ 1. Add if necessary a configuration file in %CONFIG_DIR%/packages/pentatrion_vite.yaml. 2. Verify the Vite configuration in /vite.config.js. 3. Install npm and run npm i. - 4. Add JS Twig function {{ vite_entry_script_tags('app') }} into your base.html.twig. - 5. Add CSS Twig function {{ vite_entry_link_tags('app') }} into your base.html.twig. - 6. Start the development server: npm run dev. - 7. Start coding into assets/app.js + 4. Start the development server: npm run dev. + 5. Start coding into assets/app.js