I would like to integrate Flares client side JS error logging (https://flareapp.io/docs/integration/javascript-error-tracking/installation).
The problem is that I cannot link to Vite assets in Filament because that will create a circular dependency.
FilamentAsset::register([
Js::make('app-js', Vite::asset('resources/js/app.js')),
]);
import { flare } from "@flareapp/js";
const env = process.env.NODE_ENV;
if (env === "production" || env === "staging") {
flare.light();
}
When doing this Vite will require a manifest which can only be generated after composer is installed which can only happen after the manifest is generated... etc.
How should I solve this?