Skip to content

Commit

Permalink
Update next config. Disable swcminify
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanelian committed Oct 7, 2022
1 parent fa6d99b commit be0c422
Showing 1 changed file with 22 additions and 2 deletions.
24 changes: 22 additions & 2 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// https://securityheaders.com/
function getSecurityHeaders(isProd) {
const headers = [
{
Expand Down Expand Up @@ -31,8 +32,9 @@ function getSecurityHeaders(isProd) {
},
{
// https://report-uri.com/home/generate
// https://csp-evaluator.withgoogle.com/
key: 'Content-Security-Policy',
value: `default-src 'self'; script-src 'self'; script-src-elem 'self'; style-src 'self' 'unsafe-inline'; img-src 'self'; font-src 'self'`
value: `default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self'; font-src 'self'; object-src 'none'`
}
);
}
Expand All @@ -54,7 +56,25 @@ module.exports = {
oidcScope: process.env['OIDC_SCOPE'],
},
productionBrowserSourceMaps: true,
swcMinify: true,
/*
Disable swcMinify for now
https://github.com/vercel/next.js/issues/40889
index.js:235
TypeError: number 0 is not iterable (cannot read property Symbol(Symbol.iterator))
at new Map (<anonymous>)
at Overflow.js:173:1
at useBatchFrameState.js:32:34
at eD (Overflow.js:173:1)
at P (Item.js:33:1)
at Item.js:38:1
at uJ (react-dom.production.min.js:241:246)
at u1 (react-dom.production.min.js:245:114)
at o5 (react-dom.production.min.js:285:374)
at react-dom.production.min.js:284:398
*/
swcMinify: false,
async headers() {
return [
{
Expand Down

0 comments on commit be0c422

Please sign in to comment.