I am trying to deploy my PHP application to Vercel but it throws error below.
Two or more files have conflicting paths or names. Please make sure path segments and filenames, without their extension, are unique. The path "api/bootstrap.min.js" has conflicts with "api/bootstrap.min.css".
I was wondering how bootstrap.min.css is the same as bootstrap.min.js. How do I bypass or solve this error?
Here is my vercel.json file.
{
"functions": {
"api/*.php": {
"runtime": "[email protected]"
}
},
"routes": [
{ "src": "/api/(.*)", "dest": "/index.php" }
]
}
With this Vercel Docs. https://vercel.com/docs/concepts/functions/serverless-functions
I found out that this is because the Vercel treats all of the api/*
files as a serverless functions, which means both the "api/bootstrap.min.js" and the "api/bootstrap.min.css" will be mapped to the route "/bootstrap".
Using Bootstrap's CDN file solve the issue.