Files
DefectingCat.github.io/next.config.mjs
DefectingCat f1eca69d16 add esm only
2022-09-30 09:44:12 +08:00

45 lines
1.1 KiB
JavaScript

// import composePlugins from 'next-compose-plugins';
// const composedConfig = composePlugins([
// /** @type {import('next').NextConfig} */
// {
// reactStrictMode: true,
// output: 'standalone',
// experimental: {
// // runtime: 'nodejs',
// // outputStandalone: true,
// images: { allowFutureImage: true },
// },
// pageExtensions: ['ts', 'tsx', 'js', 'jsx', 'md', 'mdx'],
// images: { domains: ['avatars.githubusercontent.com'] },
// },
// ]);
/**
* @type {import('next').NextConfig}
*/
const isExport = process.env.NEXT_BUILD === 'export';
const nextConfig = {
/* config options here */
reactStrictMode: true,
swcMinify: true,
output: 'standalone',
images: isExport ? { unoptimized: true } : {},
experimental: {
// runtime: 'nodejs',
// outputStandalone: true,
esmExternals: true,
},
// assetPrefix: isExport ? './' : undefined,
// images:
// process.env.NEXT_BUILD === 'export'
// ? {
// loader: 'imgix',
// path: 'https://rua.plus/',
// }
// : {},
pageExtensions: ['ts', 'tsx', 'js', 'jsx', 'md', 'mdx'],
};
export default nextConfig;