easyYoutubeFullscreen/next.config.js
2024-01-03 22:56:14 +01:00

51 lines
1.4 KiB
JavaScript

const {version} = require('./package.json');
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
crossOrigin: 'anonymous',
images: {
loader: 'akamai',
path: '',
},
typescript: {
ignoreBuildErrors: true,
},
eslint: {
ignoreDuringBuilds: true,
},
publicRuntimeConfig: {
version,
},
poweredByHeader: false,
async headers() {
return [
{
source: '/:path*',
headers: [
{key: 'Access-Control-Allow-Origin', value: '*'},
{key: 'Access-Control-Allow-Methods', value: 'GET, POST, OPTIONS, PUT, PATCH, DELETE'},
{key: 'Access-Control-Allow-Headers', value: 'X-Requested-With,content-type,Authorization'},
{key: 'Access-Control-Allow-Credentials', value: 'true'},
],
},
];
},
webpack: (config, {isServer, webpack}) => {
if (!isServer) {
config.resolve.fallback = {fs: false, process: false, path: false, crypto: false};
}
config.plugins.push(
new webpack.IgnorePlugin({
resourceRegExp: /~$/,
})
);
return config;
},
experimental: {
workerThreads: false,
cpus: 1
},
};
module.exports = nextConfig;