diff --git a/cypress/plugins/deployProject.js b/cypress/plugins/deployProject.js index 95f0141..19d8100 100644 --- a/cypress/plugins/deployProject.js +++ b/cypress/plugins/deployProject.js @@ -8,9 +8,6 @@ const getBaseUrl = require("./getBaseUrl"); const deployLocally = ({ project }, config) => { process.stdout.write(`Deploying project: ${project}...`); - // _headers breaks netlify dev - removeSync(join(config.buildsFolder, project, "out_publish", "_headers")); - // Start server. Must start in detached mode, so that we can kill it later. // Otherwise, we seem unable to kill it. // See: https://medium.com/@almenon214/killing-processes-with-node-772ffdd19aad diff --git a/lib/steps/setupHeaders.js b/lib/steps/setupHeaders.js index ed20a95..703fe30 100644 --- a/lib/steps/setupHeaders.js +++ b/lib/steps/setupHeaders.js @@ -20,7 +20,7 @@ const setupHeaders = (publishPath) => { // Add rule to override cache control for static chunks const indentNewLine = (s) => `\n ${s}`; const staticChunkRule = [ - `/*/_next/static/chunks/*`, + `/_next/static/chunks/*`, indentNewLine(`cache-control: public`), indentNewLine(`cache-control: max-age=31536000`), indentNewLine(`cache-control: immutable`), diff --git a/tests/__snapshots__/defaults.test.js.snap b/tests/__snapshots__/defaults.test.js.snap index 01c8d7e..9e08179 100644 --- a/tests/__snapshots__/defaults.test.js.snap +++ b/tests/__snapshots__/defaults.test.js.snap @@ -2,7 +2,7 @@ exports[`Headers creates Netlify headers 1`] = ` "# Next-on-Netlify Headers -/*/_next/static/chunks/* +/_next/static/chunks/* cache-control: public cache-control: max-age=31536000 cache-control: immutable"