Ritesh Kumar
Ritesh Kumar
This isn't webpack. The webpack prefix is there because it was used to build it. You should check the CSS on production and compare it with what you get locally....
In https://github.com/ritz078/transform/blob/707f15f6f26fcddf0a2d4f3324dea1f18225d2c1/pages/_error.tsx#L11 replace `statusCode === 404` with `false` and open a route that does not exist. for eg: http://localhost:3000/a
#### 📝Changed routes: | [**/css-to-js**](https://transform-git-ts-json-schema-fix.ritz078.now.sh/css-to-js) | [**/css-to-tailwind**](https://transform-git-ts-json-schema-fix.ritz078.now.sh/css-to-tailwind) | |:-:|:-:| |(view full size) |(view full size) | | [**…typescript-declaration**](https://transform-git-ts-json-schema-fix.ritz078.now.sh/flow-to-typescript-declaration) | [**/flow-to-typescript**](https://transform-git-ts-json-schema-fix.ritz078.now.sh/flow-to-typescript) | |:-:|:-:| |(view full size) |(view full size) | |...
Sadly this breaks only in production and works fine locally. While I work on a fix, you can run this locally if that's a blocker.
> is this actually a wontfix? No. I fixed this locally but this breaks in production. I haven't been able to pinpoint the actual reason. > How can we help...
I know this works locally but not on production. the package used for this conversion looks for lib.d.ts which it isn't able to find in production
I think the reason it is not working is because the API needs filesystem to work but vercel is serverless. The only solution I can think of right now is...
https://github.com/ritz078/transform/blob/master/pages/api/typescript-to-json-schema.ts is the API code that is deployed on vercel as a serverless function. The client-side uses this API. As you can see it does filesystem operation which doesn't work...
@ShivnathGupta That didn't work https://github.com/ritz078/transform/pull/329
This looks great @JLarky . I will check again when the PR is complete.