You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the application is served on the subpath https://<domain>:<server port>/proxy/<client port>/.
when /proxy/<client port>/resources/js/app.js tries to load import ./bootstrap.js, it fails because it tries to resolve the url at the base of the url at /resources/js/bootstrap.js instead of /proxy/<client port>/resources/js/bootstrap.js
which seems to fix it at runtime but we get this warning:
10:02:21 AM [vite] (client) warning:
/config/workspace/bootcamp/blade/chirper/resources/js/app.js
1 | import(`${import.meta.env.BASE_URL}/resources/js/bootstrap`);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2 |
3 | import Alpine from 'alpinejs';
The above dynamic import cannot be analyzed by Vite.
See https://github.com/rollup/plugins/tree/master/packages/dynamic-import-vars#limitations for supported dynamic import formats. If this is intended to be left as-is, you can use the /* @vite-ignore */ comment inside the import() call to suppress this warning.
Plugin: vite:import-analysis
im also running into a similar situation for: /node_modules/vite/dist/client/env.mjs and /node_modules/.vite/deps/alpinejs.js?v=cb748f84
where they get served at the root instead from what I would expect at /proxy/<client port>/node_modules/vite/dist/client/env.mjs and /proxy/<client port>/.vite/deps/alpinejs.js?v=cb748f84 respectively and favicon.ico as well
how to best handle this on laravel 11.X without setting up a reverse proxy?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
the application is served on the subpath
https://<domain>:<server port>/proxy/<client port>/
.when
/proxy/<client port>/resources/js/app.js
tries to loadimport ./bootstrap.js
, it fails because it tries to resolve the url at the base of the url at/resources/js/bootstrap.js
instead of/proxy/<client port>/resources/js/bootstrap.js
a temporary fix (not ideal) is to modify:
https://github.com/laravel/laravel/blob/9edc9aad80f22bc5fb49ec211b5b997b6b67aa15/resources/js/app.js#L1
to
import(
${import.meta.env.BASE_URL}/resources/js/bootstrap);
which seems to fix it at runtime but we get this warning:
im also running into a similar situation for:
/node_modules/vite/dist/client/env.mjs
and/node_modules/.vite/deps/alpinejs.js?v=cb748f84
where they get served at the root instead from what I would expect at
/proxy/<client port>/node_modules/vite/dist/client/env.mjs
and/proxy/<client port>/.vite/deps/alpinejs.js?v=cb748f84
respectively andfavicon.ico
as wellhow to best handle this on laravel 11.X without setting up a reverse proxy?
Beta Was this translation helpful? Give feedback.
All reactions