Vite with CDN #44269
-
Hi, I created a Github Action to build my assets and deploy those assets to S3 backed with CloudFront CDN. The assets are build and uploaded successfully, I've also set the But the
"resources/js/app.js": {
"file": "assets/app.171492f1.js",
"src": "resources/js/app.js",
"isEntry": true
},
"resources/js/app.js": {
"file": "assets/app.33382a95.js",
"src": "resources/js/app.js",
"isEntry": true
}, The included script using <script type="module" src="{{ CLOUDFRONT_URL }}/build/assets/app.171492f1.js"></script> Anyone has any idea how to resolve this? Thank you. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 2 replies
-
Please refer to this ASSET_URL |
Beta Was this translation helpful? Give feedback.
-
Hey @kevinpurwito did you find the solution? |
Beta Was this translation helpful? Give feedback.
-
This seems to be marked as answered but I don't know why. When using the An example of this would be having all my built assets in an AWS S3 bucket including my locally built When i set an The workaround would be to add a local route for |
Beta Was this translation helpful? Give feedback.
-
Hi @stephan-v
You can still upload your assets to S3, also setting If you for some reason need to get // app/Providers/AppServiceProvider.php
use App\Services\Vite;
...
public function register(): void
{
$this->app->singleton(\Illuminate\Foundation\Vite::class, Vite::class);
} Inside your protected function manifest($buildDirectory)
{
//Retrive manifest.json from S3
} |
Beta Was this translation helpful? Give feedback.
Hi @kevinpurwito
Please refer to this ASSET_URL