mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-16 03:23:29 +01:00
refactor: switch to next.js
This commit is contained in:
34
packages/website/next.config.js
Normal file
34
packages/website/next.config.js
Normal file
@@ -0,0 +1,34 @@
|
||||
// eslint-disable-next-line @typescript-eslint/no-require-imports, @typescript-eslint/no-var-requires
|
||||
const UnoCSS = require('@unocss/webpack').default;
|
||||
|
||||
/**
|
||||
* @type {import('next').NextConfig}
|
||||
*/
|
||||
module.exports = {
|
||||
reactStrictMode: true,
|
||||
swcMinify: true,
|
||||
experimental: {
|
||||
images: {
|
||||
allowFutureImage: true,
|
||||
},
|
||||
},
|
||||
images: {
|
||||
dangerouslyAllowSVG: true,
|
||||
contentSecurityPolicy: "default-src 'self'; script-src 'none'; sandbox;",
|
||||
},
|
||||
webpack(config, context) {
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call
|
||||
config.plugins.push(UnoCSS());
|
||||
|
||||
if (context.buildId !== 'development') {
|
||||
// * disable filesystem cache for build
|
||||
// * https://github.com/unocss/unocss/issues/419
|
||||
// * https://webpack.js.org/configuration/cache/
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
||||
config.cache = false;
|
||||
}
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
||||
return config;
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user