GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||
GeezerVison is showing github.com — fix(@angular/build): resolve dev-server `sslKey` and `sslCert` relative to the workspace root by MeAkib · Pull Request #34399 · angular/angular-cli Conversation
Contributor
The Vite-based dev server read
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
…ve to the workspace root The Vite-based dev server read `sslKey` and `sslCert` relative to the current working directory, so serving failed with `ENOENT` when `ng serve` ran from a subdirectory of the workspace and the paths in `angular.json` were relative. Resolve both paths against the workspace root, as the webpack dev server already does. The new dev-server `ssl` spec covers relative paths. It fails with `ENOENT` without this change.
alan-agius4
requested changes
|
| const tsconfig = path.join(workspaceRoot, options.tsConfig); |
| const fileReplaceWith = path.join(workspaceRoot, replacement.with); |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
This pull request updates the Vite dev-server configuration to resolve the sslCert and sslKey paths relative to the workspace root. Additionally, a new test suite has been added to verify this behavior. There are no review comments, and I have no feedback to provide.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
… relative to the workspace root
There was an error while loading. Please reload this page.
… relative to the workspace root
0ae6773 to
08e9727
Compare
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
This breaks legitimate use cases such as:
ng serve --ssl --ssl-key "$HOME/.certs/key.pem" --ssl-cert "$HOME/.certs/cert.pem"
Sorry, something went wrong.
There was an error while loading. Please reload this page.
… relative to the workspace root
There was an error while loading. Please reload this page.
…sslCert` relative to the workspace root Previously, the esbuild-based dev-server passed relative `sslKey` and `sslCert` paths to Vite as is, so they were read relative to the current directory and `ng serve` failed with ENOENT when run outside the workspace root. The paths are now resolved against the workspace root, matching `@angular/build`.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
lgtm, build-angular dev-server now resolves sslKey/sslCert from workspace root same as @angular/build, and new spec covers that path
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
This PR was merged into the repository. The changes were merged into the following branches: |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…ve to the workspace root (#34399) The Vite-based dev server read `sslKey` and `sslCert` relative to the current working directory, so serving failed with `ENOENT` when `ng serve` ran from a subdirectory of the workspace and the paths in `angular.json` were relative. Resolve both paths against the workspace root, as the webpack dev server already does. The new dev-server `ssl` spec covers relative paths. It fails with `ENOENT` without this change. PR Close #34399
…sslCert` relative to the workspace root (#34399) Previously, the esbuild-based dev-server passed relative `sslKey` and `sslCert` paths to Vite as is, so they were read relative to the current directory and `ng serve` failed with ENOENT when run outside the workspace root. The paths are now resolved against the workspace root, matching `@angular/build`. PR Close #34399
…sslCert` relative to the workspace root (angular#34399) Previously, the esbuild-based dev-server passed relative `sslKey` and `sslCert` paths to Vite as is, so they were read relative to the current directory and `ng serve` failed with ENOENT when run outside the workspace root. The paths are now resolved against the workspace root, matching `@angular/build`. PR Close angular#34399
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.