Backend integration in development
See original GitHub issueClear and concise description of the problem
if I want to use vite with my backend integration, I don’t know if vite client is running and I have to take :
<script type="module" src="http://localhost:3000/@vite/client"></script>
<script type="module" src="http://localhost:3000/main.js"></script>
or if I have to use files from manifest.json
:
<link rel="stylesheet" href="/assets/{{ manifest['main.js'].css }}" />
<script type="module" src="/assets/{{ manifest['main.js'].file }}"></script>
As a developer, I think it would be interesting to know if files documented by manifest.json are out of date when I’m running the vite client : http://localhost:3000/@vite/client
Suggested solution
delete the manifest.json
when I’m running the vite dev client. so I know that I have to call
<script type="module" src="http://localhost:3000/@vite/client"></script>
<script type="module" src="http://localhost:3000/main.js"></script>
Alternative
update the manifest.json
with dev informations when I’m running the vite dev client.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:5
- Comments:8 (1 by maintainers)
Top Results From Across the Web
Backend Integration - Microservice API Patterns
Integrate the backend of a distributed application with one or more other backends (of the same or other distributed applications) by exposing its...
Read more >B Front-End and Back-End Integration
Back-End Integration ... In this implementation, users interact with only one application at a time in a manner determined by their user roles.The...
Read more >Backend Web Development | API Integration | Middleware
Securely authenticating and registering users · Integrating with content streams and feeds · Providing access to payment processing services · Processing and ...
Read more >A Seven-Step Guide to API-First Integration - InfoQ
Based on the project requirements, the backend development team develops the integration layer exposing the existing systems.
Read more >What do you mean by 'Integrating with Back-end Services' in ...
It means exactly that. Backend services could be RESTful or other APIs which you can integrate to using standard http / JSON libraries,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
In my case I would love to use Vite to replace Webpack in our PHP app, for faster build times during development. Right now that’s not an option.
Most pages have their own entrypoints. We scan manifest files generated by Webpack in both development and production mode to render out all the
<script>
and<link>
tags for the current page.The Alternative option stated above - generating
manifest.json
when runningvite
in development mode - would be ideal. This would enable us to use Vite.hi @bluwy, my issue was : if you use vite with a backend like Symfony. you use the
manifest.json
to generate your entrypoints. if your manifest is present, you parse the file to determine the scripts to include. if your manifest is not present, you create a connection with the dev server. but if you run the dev server and your manifest is still present you have no easy way to know that you have to include in your script tag the connection to the dev server.this issue is solved with https://github.com/lhapaipai/vite-plugin-symfony