Skip to content

Commit 06fded4

Browse files
author
Angular Builds
committed
412fe6e fix(@angular-devkit/build-angular): pre-transform error when using vite with SSR
1 parent a96d495 commit 06fded4

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
{
22
"name": "@angular-devkit/build-angular",
3-
"version": "17.1.0+sha-18879eb",
3+
"version": "17.1.0+sha-412fe6e",
44
"description": "Angular Webpack Build Facade",
55
"main": "src/index.js",
66
"typings": "src/index.d.ts",
77
"builders": "builders.json",
88
"dependencies": {
99
"@ampproject/remapping": "2.2.1",
10-
"@angular-devkit/architect": "github:angular/angular-devkit-architect-builds#18879eb",
11-
"@angular-devkit/build-webpack": "github:angular/angular-devkit-build-webpack-builds#18879eb",
12-
"@angular-devkit/core": "github:angular/angular-devkit-core-builds#18879eb",
10+
"@angular-devkit/architect": "github:angular/angular-devkit-architect-builds#412fe6e",
11+
"@angular-devkit/build-webpack": "github:angular/angular-devkit-build-webpack-builds#412fe6e",
12+
"@angular-devkit/core": "github:angular/angular-devkit-core-builds#412fe6e",
1313
"@babel/core": "7.23.7",
1414
"@babel/generator": "7.23.6",
1515
"@babel/helper-annotate-as-pure": "7.22.5",
@@ -20,7 +20,7 @@
2020
"@babel/preset-env": "7.23.7",
2121
"@babel/runtime": "7.23.7",
2222
"@discoveryjs/json-ext": "0.5.7",
23-
"@ngtools/webpack": "github:angular/ngtools-webpack-builds#18879eb",
23+
"@ngtools/webpack": "github:angular/ngtools-webpack-builds#412fe6e",
2424
"@vitejs/plugin-basic-ssl": "1.0.2",
2525
"ansi-colors": "4.1.3",
2626
"autoprefixer": "10.4.16",

src/tools/vite/angular-memory-plugin.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,9 @@ function createAngularMemoryPlugin(options) {
126126
return () => {
127127
function angularSSRMiddleware(req, res, next) {
128128
const url = req.originalUrl;
129-
if (
130-
// Skip if path is not defined.
131-
!url ||
129+
if (!req.url ||
130+
// Skip if path is not defined.
131+
!url ||
132132
// Skip if path is like a file.
133133
// NOTE: We use a regexp to mitigate against matching requests like: /browse/pl.0ef59752c0cd457dbf1391f08cbd936f
134134
/^\.[a-z]{2,4}$/i.test((0, node_path_1.extname)(url.split('?')[0]))) {
@@ -140,7 +140,7 @@ function createAngularMemoryPlugin(options) {
140140
next();
141141
return;
142142
}
143-
transformIndexHtmlAndAddHeaders(url, rawHtml, res, next, async (html) => {
143+
transformIndexHtmlAndAddHeaders(req.url, rawHtml, res, next, async (html) => {
144144
const { content } = await (0, render_page_1.renderPage)({
145145
document: html,
146146
route: new URL(req.originalUrl ?? '/', server.resolvedUrls?.local[0]).toString(),

uniqueId

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Mon Jan 22 2024 15:01:21 GMT+0000 (Coordinated Universal Time)
1+
Mon Jan 22 2024 15:09:54 GMT+0000 (Coordinated Universal Time)

0 commit comments

Comments
 (0)