-
Notifications
You must be signed in to change notification settings - Fork 2
/
next.config.js
35 lines (32 loc) · 951 Bytes
/
next.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
const withBundleAnalyzer = require("@next/bundle-analyzer")({
enabled: process.env.ANALYZE === "true",
});
const withTM = require("next-transpile-modules")(["@cosmos-kit/web3auth"]);
/** @type {import('next').NextConfig} */
module.exports = withTM(
withBundleAnalyzer({
reactStrictMode: true,
swcMinify: false,
output: 'standalone',
webpack: (config) => {
config.module.rules.push({
test: /\.(ts|tsx)$/,
use: [
{
loader: "babel-loader",
options: {
presets: [
"@babel/preset-env",
["@babel/preset-react", { runtime: "automatic" }],
["@babel/preset-typescript", { allowDeclareFields: true }],
],
plugins: ["babel-plugin-inline-import-data-uri"],
},
},
],
});
config.resolve.extensions.push(".ts", ".tsx");
return config;
},
})
);