mirror of
https://github.com/luxfi/explore.git
synced 2026-09-24 00:28:18 +00:00
* update csv export text * fix pw tests * base layout and customization for home page and search results page * refactor rest of the pages * refactor AppError * move header padding to layout * move nextjs utils to separate folder * combine PageServer and Page * make useQueryClientConfig hook * add tests * remove unused var * fix envs for pw * fix pw tests
52 lines
1.5 KiB
JavaScript
52 lines
1.5 KiB
JavaScript
const withTM = require('next-transpile-modules')([
|
|
'react-syntax-highlighter',
|
|
'swagger-client',
|
|
'swagger-ui-react',
|
|
]);
|
|
const path = require('path');
|
|
|
|
const withRoutes = require('nextjs-routes/config')({
|
|
outDir: 'nextjs',
|
|
});
|
|
|
|
const headers = require('./nextjs/headers');
|
|
const redirects = require('./nextjs/redirects');
|
|
const rewrites = require('./nextjs/rewrites');
|
|
|
|
const moduleExports = withTM({
|
|
include: path.resolve(__dirname, 'icons'),
|
|
reactStrictMode: true,
|
|
webpack(config, { webpack }) {
|
|
config.plugins.push(
|
|
new webpack.DefinePlugin({
|
|
__SENTRY_DEBUG__: false,
|
|
__SENTRY_TRACING__: false,
|
|
}),
|
|
);
|
|
config.module.rules.push(
|
|
{
|
|
test: /\.svg$/,
|
|
use: [ '@svgr/webpack' ],
|
|
},
|
|
);
|
|
config.resolve.fallback = { fs: false, net: false, tls: false };
|
|
|
|
return config;
|
|
},
|
|
// NOTE: all config functions should be static and not depend on any environment variables
|
|
// since all variables will be passed to the app only at runtime and there is now way to change Next.js config at this time
|
|
// if you are stuck and strongly believe what you need some sort of flexibility here please fill free to join the discussion
|
|
// https://github.com/blockscout/frontend/discussions/167
|
|
rewrites,
|
|
redirects,
|
|
headers,
|
|
output: 'standalone',
|
|
api: {
|
|
// disable body parser since we use next.js api only for local development and as a proxy
|
|
// otherwise it is impossible to upload large files (over 1Mb)
|
|
bodyParser: false,
|
|
},
|
|
});
|
|
|
|
module.exports = withRoutes(moduleExports);
|