1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-24 12:26:40 +07:00
vault-frontend/next.config.js
Fedor Katurov db453a86c6
Some checks failed
Build & Publish / Build & Publish (push) Has been cancelled
add standalone build
2025-03-24 18:01:11 +07:00

50 lines
1.2 KiB
JavaScript

/** used to transpile UMD and CJS modules */
const withBundleAnalyzer = require('@next/bundle-analyzer')({
enabled: process.env.ANALYZE === 'true',
});
const withTM = require('next-transpile-modules')([
'ramda',
'@v9v/ts-react-telegram-login',
]);
module.exports = withBundleAnalyzer(
withTM({
output: 'standalone',
/** rewrite old-style node paths */
async rewrites() {
return [
{
// everything except 'post' is for backwards compatibility here
source: '/(post|photo|blog|song|video|cell):id',
destination: '/node/:id',
},
{
source: '/~:username',
destination: '/profile/:username',
},
];
},
/** don't try to optimize fonts */
optimizeFonts: false,
images: {
remotePatterns: [
{
protocol: 'https',
hostname: 'vault48.org',
pathname: '/static/**',
},
{
protocol: 'https',
hostname: '*.ytimg.com',
pathname: '/**',
},
{
protocol: 'http',
hostname: 'localhost',
pathname: '/**',
},
],
},
}),
);