Skip to content

Commit

Permalink
fix: excludedPath contained relative paths for some prerendered sta…
Browse files Browse the repository at this point in the history
…tic files (#74)

* fix: correctly generate excludedPath + add test setup

* fix: remove --serve now that netlify/cli#6138 landed

* fix: prettier

* fix: update node version

* fix: for some reason, `--offline` doesn't infer the build command

* fix: update minimum node version to 18.13.0, to align with Angular CLI

See https://github.com/angular/cli-builds/blob/1f309514d9f8d81fb2dfbcb163b554d79394a67c/bin/ng.js#L64# Please enter the commit message for your changes. Lines starting

* fix: excludedPath should always be posix
  • Loading branch information
Skn0tt committed Nov 9, 2023
1 parent e6fab5f commit 5843bc8
Show file tree
Hide file tree
Showing 8 changed files with 38,265 additions and 4,713 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macOS-latest, windows-latest]
node-version: [10.13.0, '*']
node-version: [18.13.0, '*']
exclude:
- os: macOS-latest
node-version: 10.13.0
node-version: 18.13.0
- os: windows-latest
node-version: 10.13.0
node-version: 18.13.0
fail-fast: false

steps:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ Keep in mind that these will not be available on the client-side or during [prer
To test this in local development, run your Angular project using `netlify serve`:

```sh
netlify serve --dir dist/<your-project-name>/browser
netlify serve
```

## CLI Usage
Expand Down
18 changes: 18 additions & 0 deletions demo.test.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import assert from 'node:assert'
import { test } from 'node:test'

test('edge function config', async () => {
const { config } = await import('./demo/.netlify/edge-functions/angular-ssr/angular-ssr.mjs')

assert.deepEqual(config.excludedPath, [
'/dashboard/index.html',
'/favicon.ico',
'/heroes/index.html',
'/index.html',
'/main-UUT7SL5W.js',
'/polyfills-LZBJRJJE.js',
'/styles-5INURTSO.css',
'/dashboard',
'/heroes',
])
})
1 change: 1 addition & 0 deletions demo/netlify.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[build]
command="npm run build"
ignore="exit 1" ## always build, there might be changes in the plugin

[[plugins]]
Expand Down
2 changes: 1 addition & 1 deletion demo/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 5843bc8

Please sign in to comment.