Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

spectral_flux's avatar

@vite on blade from S3 bucket

Hello everyone,

I'm working on a laravel/vite/inertia/vue site, I want to load the app.js from an external server, I tried

But I get Uncaught SyntaxError: import declarations may only appear at top level of a module

When i try on app.blade.php @vite('https://xxxx.cloudfront.net/build/assets/app.8082c4ad.js') I get Unable to locate file in Vite manifest: https://dr3t2hw2qoqpw.cloudfront.net/build/assets/app.8082c4ad.js.

I also tried in vite.config.js '' laravel({ input: [ 'resources/js/app.js', ], refresh: true, url: 'https://dr3t2hw2qoqpw.cloudfront.net/build/assets/app.8082c4ad.js', }),''

To no success

Can anyone point me to the right direction?

Help me obi ones, you are my only hope

0 likes
0 replies

Please or to participate in this conversation.