update pentatrion/vite-bundle manifest add-lines (#1525)

This commit is contained in:
Hugues Tavernier
2023-06-24 17:32:41 +02:00
committed by GitHub
parent 6378a83072
commit 35a37f4f66
2 changed files with 19 additions and 5 deletions
+17 -1
View File
@@ -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
}
]
}
+2 -4
View File
@@ -6,8 +6,6 @@
1. Add if necessary a configuration file in <comment>%CONFIG_DIR%/packages/pentatrion_vite.yaml</>.
2. Verify the Vite configuration in <comment>/vite.config.js</>.
3. Install npm and run <comment>npm i</>.
4. Add JS Twig function <comment>{{ vite_entry_script_tags('app') }}</> into your base.html.twig.
5. Add CSS Twig function <comment>{{ vite_entry_link_tags('app') }}</> into your base.html.twig.
6. Start the development server: <comment>npm run dev</>.
7. Start coding into <comment>assets/app.js</>
4. Start the development server: <comment>npm run dev</>.
5. Start coding into <comment>assets/app.js</>