Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Telescope is using the wrong assets in dev after migrating to Vite #1399

Closed
wfern opened this issue Nov 1, 2023 · 4 comments
Closed

Telescope is using the wrong assets in dev after migrating to Vite #1399

wfern opened this issue Nov 1, 2023 · 4 comments

Comments

@wfern
Copy link

wfern commented Nov 1, 2023

Telescope Version

4.17.0

Laravel Version

10.29.0

PHP Version

8.2

Database Driver & Version

MySQL 8.0.31 for macOS 14.0

Description

Hello!

After migrating to Vite. When running npm run dev the Telescope assets also point to the dev server instead of the production compiled assets.

Of course if I run npm run build everything works fine.

Steps To Reproduce

Open telescope after running the npm run dev command.

@crynobone
Copy link
Member

Hey there, thanks for reporting this issue.

We'll need more info and/or code to debug this further. Can you please create a repository with the command below, commit the code that reproduces the issue as one separate commit on the main/master branch and share the repository here?

Please make sure that you have the latest version of the Laravel installer in order to run this command. Please also make sure you have both Git & the GitHub CLI tool properly set up.

laravel new bug-report --github="--public"

Do not amend and create a separate commit with your custom changes. After you've posted the repository, we'll try to reproduce the issue.

Thanks!

@wfern
Copy link
Author

wfern commented Nov 1, 2023

Here is the repository: https://github.com/wfern/laravel-telescope-vite-bug-report

The only commit was just to install Telescope. Now just run npm run dev, open http://.../telescope and see that the assets are from "dev" and not those compiled from '/public/vendor/telescope'.

With npm run dev:
image

After npm run build and how it should be in dev too:
image

@taylorotwell
Copy link
Member

Reverted #1391

@francoism90
Copy link

I'm having the same issue, both npm run dev and npm run build causes the same issue.

It's weird, because the upgrade to v4.17.0 works fine in another project I'm using. The only differences, seems to be multi-tenancy (I don't use this in working project with Telescope), but that's just speculation in my end, but it seems Vite is getting confused somehow/don't points to the correct endpoint.

@taylorotwell Thanks for the revert, hopefully it can be fully fixed. If more info is needed, please let me know. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants