This repository was archived by the owner on May 10, 2021. It is now read-only.
This repository was archived by the owner on May 10, 2021. It is now read-only.
Header config causes CLI to throw "invalid rule: cannot contain anything after *" #151
Closed
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.
next-on-netlify/lib/steps/setupHeaders.js
Lines 22 to 27 in e1f0378
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
Metadata
Metadata
Assignees
Labels
No labels