Skip to content

Backend integration in development #2908

@lhapaipai

Description

@lhapaipai

Clear 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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions