diff --git a/examples/with-next-custom-button/next.config.js b/examples/with-next-custom-button/next.config.js index 91ef62f0d..6c88b7040 100644 --- a/examples/with-next-custom-button/next.config.js +++ b/examples/with-next-custom-button/next.config.js @@ -1,6 +1,10 @@ /** @type {import('next').NextConfig} */ const nextConfig = { reactStrictMode: true, + webpack: config => { + config.externals.push('pino-pretty', 'lokijs', 'encoding') + return config + }, }; module.exports = nextConfig; diff --git a/examples/with-next-mint-nft/next.config.js b/examples/with-next-mint-nft/next.config.js index 91ef62f0d..6c88b7040 100644 --- a/examples/with-next-mint-nft/next.config.js +++ b/examples/with-next-mint-nft/next.config.js @@ -1,6 +1,10 @@ /** @type {import('next').NextConfig} */ const nextConfig = { reactStrictMode: true, + webpack: config => { + config.externals.push('pino-pretty', 'lokijs', 'encoding') + return config + }, }; module.exports = nextConfig; diff --git a/examples/with-next-rainbow-button/next.config.js b/examples/with-next-rainbow-button/next.config.js index 91ef62f0d..6c88b7040 100644 --- a/examples/with-next-rainbow-button/next.config.js +++ b/examples/with-next-rainbow-button/next.config.js @@ -1,6 +1,10 @@ /** @type {import('next').NextConfig} */ const nextConfig = { reactStrictMode: true, + webpack: config => { + config.externals.push('pino-pretty', 'lokijs', 'encoding') + return config + }, }; module.exports = nextConfig; diff --git a/examples/with-next-siwe-iron-session/next.config.js b/examples/with-next-siwe-iron-session/next.config.js index 91ef62f0d..6c88b7040 100644 --- a/examples/with-next-siwe-iron-session/next.config.js +++ b/examples/with-next-siwe-iron-session/next.config.js @@ -1,6 +1,10 @@ /** @type {import('next').NextConfig} */ const nextConfig = { reactStrictMode: true, + webpack: config => { + config.externals.push('pino-pretty', 'lokijs', 'encoding') + return config + }, }; module.exports = nextConfig; diff --git a/examples/with-next-siwe-next-auth/next.config.js b/examples/with-next-siwe-next-auth/next.config.js index 91ef62f0d..6c88b7040 100644 --- a/examples/with-next-siwe-next-auth/next.config.js +++ b/examples/with-next-siwe-next-auth/next.config.js @@ -1,6 +1,10 @@ /** @type {import('next').NextConfig} */ const nextConfig = { reactStrictMode: true, + webpack: config => { + config.externals.push('pino-pretty', 'lokijs', 'encoding') + return config + }, }; module.exports = nextConfig; diff --git a/examples/with-next-wallet-button/next.config.js b/examples/with-next-wallet-button/next.config.js index 91ef62f0d..6c88b7040 100644 --- a/examples/with-next-wallet-button/next.config.js +++ b/examples/with-next-wallet-button/next.config.js @@ -1,6 +1,10 @@ /** @type {import('next').NextConfig} */ const nextConfig = { reactStrictMode: true, + webpack: config => { + config.externals.push('pino-pretty', 'lokijs', 'encoding') + return config + }, }; module.exports = nextConfig; diff --git a/examples/with-next/next.config.js b/examples/with-next/next.config.js index 679cf78cc..9a160fd61 100644 --- a/examples/with-next/next.config.js +++ b/examples/with-next/next.config.js @@ -1,6 +1,10 @@ /** @type {import('next').NextConfig} */ const nextConfig = { reactStrictMode: true, + webpack: config => { + config.externals.push('pino-pretty', 'lokijs', 'encoding') + return config + }, i18n: { locales: ['en-US', 'zh-CN'], defaultLocale: 'en-US', diff --git a/packages/create-rainbowkit/generated-test-app/next.config.js b/packages/create-rainbowkit/generated-test-app/next.config.js index 91ef62f0d..6c88b7040 100644 --- a/packages/create-rainbowkit/generated-test-app/next.config.js +++ b/packages/create-rainbowkit/generated-test-app/next.config.js @@ -1,6 +1,10 @@ /** @type {import('next').NextConfig} */ const nextConfig = { reactStrictMode: true, + webpack: config => { + config.externals.push('pino-pretty', 'lokijs', 'encoding') + return config + }, }; module.exports = nextConfig; diff --git a/packages/create-rainbowkit/templates/next-app/next.config.js b/packages/create-rainbowkit/templates/next-app/next.config.js index 91ef62f0d..6c88b7040 100644 --- a/packages/create-rainbowkit/templates/next-app/next.config.js +++ b/packages/create-rainbowkit/templates/next-app/next.config.js @@ -1,6 +1,10 @@ /** @type {import('next').NextConfig} */ const nextConfig = { reactStrictMode: true, + webpack: config => { + config.externals.push('pino-pretty', 'lokijs', 'encoding') + return config + }, }; module.exports = nextConfig; diff --git a/packages/example/next.config.js b/packages/example/next.config.js index 1bfdfb820..25af04ae9 100644 --- a/packages/example/next.config.js +++ b/packages/example/next.config.js @@ -1,5 +1,10 @@ /** @type {import('next').NextConfig} */ module.exports = { + reactStrictMode: true, + webpack: (config) => { + config.externals.push('pino-pretty', 'lokijs', 'encoding'); + return config; + }, i18n: { defaultLocale: 'en-US', locales: [ @@ -22,5 +27,4 @@ module.exports = { 'zh-TW', ], }, - reactStrictMode: true, }; diff --git a/site/next.config.js b/site/next.config.js index 714343bbc..5e98bc95f 100644 --- a/site/next.config.js +++ b/site/next.config.js @@ -8,6 +8,10 @@ const withVanillaExtract = createVanillaExtractPlugin(); /** @type {import('next').NextConfig} */ const nextConfig = { reactStrictMode: true, + webpack: (config) => { + config.externals.push('pino-pretty', 'lokijs', 'encoding'); + return config; + }, i18n: { locales: [ 'en-US',