This repository was archived by the owner on May 10, 2021. It is now read-only.

Description
Describe the bug
The generated _headers
file contains a /*/_next/static/chunks/*
rule, which throws Error: invalid rule (A path rule cannot contain anything after * token) at line: 1
when netlify dev
is run.
|
const staticChunkRule = [ |
|
`/*/_next/static/chunks/*`, |
|
indentNewLine(`cache-control: public`), |
|
indentNewLine(`cache-control: max-age=31536000`), |
|
indentNewLine(`cache-control: immutable`), |
|
].join(""); |
This rule is disallowed by the CLI logic:
https://github.com/netlify/cli/blob/425e2c6eeb6a3b589370a78407b18c53f4b850bc/src/utils/headers.js#L65-L73
Does anyone have any suggestions as to how to remedy this?
To Reproduce
Steps to reproduce:
- Set up project
- Run
next build
to build the Next project
- Run
next-on-netlify
to build the Netlify output
- Run
netlify dev
to start dev server
- See error
Versions
- Next:
v10.0.5
- next-on-netlify:
1.22.5