next-http-proxy-middleware
next-http-proxy-middleware copied to clipboard
Remove types from dependencies
Because this is part of the main dependencies, the overall package is very huge. This PR do fixes that
Hi @stephane-segning
Thanks for your PR
Could you please check issue #17?
(If you move the @types/http-proxydependency to the devDependencies field, the TS compiler will not properly interpret the NextHttpProxyMiddlewareOptions interface.)
Thanks 😀
I've read your comment, @stegano. The thing is, that the error might come from the way it is compiled, not from the dependencies. I'm trying to provide an example of fix in the PR itself.
To help me fix it, I was worknig on this other library https://github.com/TrySound/rollup-plugin-uglify/pull/91
Hi @stephane-segning I'm sorry but I don't quite understand. Can you explain what part is the problem and what solved it?
If the user installs the next-http-proxy-middleware library, the @types/http-proxy dependency library must also be installed.
If you remove @types/http-proxy from the dependencies of this project, When user install next-http-proxy-middleware , @types/http-proxy must be installed separately. Do you think this is correct?
The problem is the TS config. I've updated it quite a little bit. And also, you should include all *.d.ts files inside the final release of your app.
The lib @types/http-proxy should always be installed if a user is working with dev deps. Typically, in dev env.
If we put @types/http-proxy in dev-deps, the problem is solved. Now, if the client has any problems with it, they explain them to us and we solve them accordingly. But not by adding @types/* to the main deps.
The problem is the TS config. I've updated it quite a little bit. And also, you should include all
*.d.tsfiles inside the final release of your app.The lib @types/http-proxy should always be installed if a user is working with dev deps. Typically, in dev env.
If we put @types/http-proxy in dev-deps, the problem is solved. Now, if the client has any problems with it, they explain them to us and we solve them accordingly. But not by adding @types/* to the main deps.
I'm sorry but I still don't quite understand,
-
@types/http-proxyis a dependency module that must be installed to use this library. I don't understand why the user has to install this separately. If a user using this library already has another version of thehttp-proxylibrary installed, the user will be confused because they have to consider two versions of@types/http-proxy. -
Even if a user makes a product using this library, all typing (interface) files will be removed from the build result.
Please let me know if I'm misunderstanding something.
The problem is the TS config. I've updated it quite a little bit. And also, you should include all *.d.ts files inside the final release of your app.
If you need to include all *.d.ts files(http-proxy, etc..) in the final release of your app, you should also include the original source code of the http-proxy library that this library depends on. This isn't common.
Hi @stephane-segning, Thanks for your interest in this project. This issue is closed, please feel free to reopen this issue if necessary.