Build error when compiling alpine component

I'm working on a custom file upload implementation using Filament PHP with an Alpine component. When I compile the component using esbuild, the build fails if I import the Axios library, but passes when I remove it.

Breakdown:
  • Importing Axios causes the esbuild compilation to fail
  • Removing Axios library allows successful compilation
I absolutely need to use Axios in this component. Has anyone encountered a similar issue or know how to resolve this esbuild configuration conflict?

Attempted Troubleshooting:
  • Verified Axios is installed via npm
  • Confirmed no syntax errors in the import
Any guidance on resolving this would be greatly appreciated!
Was this page helpful?