-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathnext.config.js
More file actions
31 lines (30 loc) · 789 Bytes
/
next.config.js
File metadata and controls
31 lines (30 loc) · 789 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
webpack: (config, { isServer }) => {
if (!isServer) {
config.module.rules.push({
test: /\.txt$/, // or whatever file type you want to import as string
use: "raw-loader",
});
}
return config;
},
async headers() {
return [
{
source: "/:path*",
headers: [
{ key: "Cross-Origin-Embedder-Policy", value: "credentialless" },
{ key: "Cross-Origin-Opener-Policy", value: "same-origin" },
],
},
];
},
eslint: {
// Warning: This allows production builds to successfully complete even if
// your project has ESLint errors.
ignoreDuringBuilds: true,
},
};
module.exports = nextConfig;