frontend-maven-plugin
frontend-maven-plugin copied to clipboard
Proxy Settings are passed to pnpm scripts as additional parameters
Do you want to request a feature or report a bug? a bug What is the current behavior? Proxy parameters to scripts in pnpm are passt to the script, not to pnpm If the current behavior is a bug, please provide the steps to reproduce.
- set Proxy settings in maven
- Run a script with pnpm for example "vue-tsc"
- Typescript will complain:
[INFO] --- frontend:1.14.2:pnpm (pnpm-run-vue-tsc) @ frontend ---
[INFO] Found proxies: [1{protocol='http', host='proxy.proxy.com', port=8080}]
[INFO] Running 'pnpm vue-tsc --https-proxy=http://proxy.proxy.com:8080'
[INFO]
[INFO] > vue-tsc "--https-proxy=http://proxy.proxy.com:8080"
[INFO]
[INFO] error TS5023: Unknown compiler option '--https-proxy=http://proxy.proxy.com:8080'.
What is the expected behavior? according to the pnpm Website, the additional options need to be passed to pnpm before the script is called. Running
pnpm --https-proxy=http://proxy.proxy.com:8080 vue-tsc
works completely fine. Please mention your frontend-maven-plugin and operating system version. frontend-maven-plugin 1.14.2 on Windows 10
This may be related to https://github.com/eirslett/frontend-maven-plugin/issues/1030 A workaround for this is to disable the proxy to be passed using:
<configuration>
<pnpmInheritsProxyConfigFromMaven>false</pnpmInheritsProxyConfigFromMaven>
</configuration>
https://github.com/eirslett/frontend-maven-plugin/pull/1120 fixes this issue. unfortunately it's not merged yet.