diff --git a/examples/nextjs/next.config.mjs b/examples/nextjs/next.config.mjs index a8080042..411efe11 100644 --- a/examples/nextjs/next.config.mjs +++ b/examples/nextjs/next.config.mjs @@ -1,38 +1,10 @@ -import CopyPlugin from "copy-webpack-plugin"; - /** @type {import('next').NextConfig} */ const nextConfig = { - webpack: (config, { isServer, dev }) => { + experimental: { + serverComponentsExternalPackages: ["@xmtp/user-preferences-bindings-wasm"], + }, + webpack: (config) => { config.externals.push("pino-pretty", "lokijs", "encoding"); - if (isServer) { - if (!dev) { - config.plugins.push( - new CopyPlugin({ - patterns: [ - { - context: ".next/server", - to: "./app/[name][ext]", - from: "../../../../node_modules/@xmtp/user-preferences-bindings-wasm/dist/node", - filter: (resourcePath) => resourcePath.endsWith(".wasm"), - }, - ], - }), - ); - } else { - config.plugins.push( - new CopyPlugin({ - patterns: [ - { - context: ".next/server", - to: "./vendor-chunks/[name][ext]", - from: "../../../../node_modules/@xmtp/user-preferences-bindings-wasm/dist/node", - filter: (resourcePath) => resourcePath.endsWith(".wasm"), - }, - ], - }), - ); - } - } return config; }, }; diff --git a/examples/nextjs/package.json b/examples/nextjs/package.json index 3ef09b21..8d2a48cf 100644 --- a/examples/nextjs/package.json +++ b/examples/nextjs/package.json @@ -18,7 +18,7 @@ "@tanstack/react-query": "^5.28.0", "@wagmi/core": "^2.6.6", "@xmtp/react-app": "workspace:*", - "next": "14.1.3", + "next": "14.2.4", "react": "^18", "react-dom": "^18", "viem": "^2.7.15", diff --git a/yarn.lock b/yarn.lock index 8bbf367d..514ac553 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2688,72 +2688,72 @@ __metadata: languageName: node linkType: hard -"@next/env@npm:14.1.3": - version: 14.1.3 - resolution: "@next/env@npm:14.1.3" - checksum: 10/b95c55530f5fb8cfb2a48a23485fd4cb584bff8620637785d7dd068c0d72d4dc0869023ed509f52fead558839f2efae4f7370a2c2fd87540201629fc39a421a5 +"@next/env@npm:14.2.4": + version: 14.2.4 + resolution: "@next/env@npm:14.2.4" + checksum: 10/1f48bd96dd92a98b8e7ccfbd494f5893174721cb164dfda898728db37c0413fe0ca71872c1c7c56a46419a417137bc3aaa3e53543f938bea14589f68474bfd73 languageName: node linkType: hard -"@next/swc-darwin-arm64@npm:14.1.3": - version: 14.1.3 - resolution: "@next/swc-darwin-arm64@npm:14.1.3" +"@next/swc-darwin-arm64@npm:14.2.4": + version: 14.2.4 + resolution: "@next/swc-darwin-arm64@npm:14.2.4" conditions: os=darwin & cpu=arm64 languageName: node linkType: hard -"@next/swc-darwin-x64@npm:14.1.3": - version: 14.1.3 - resolution: "@next/swc-darwin-x64@npm:14.1.3" +"@next/swc-darwin-x64@npm:14.2.4": + version: 14.2.4 + resolution: "@next/swc-darwin-x64@npm:14.2.4" conditions: os=darwin & cpu=x64 languageName: node linkType: hard -"@next/swc-linux-arm64-gnu@npm:14.1.3": - version: 14.1.3 - resolution: "@next/swc-linux-arm64-gnu@npm:14.1.3" +"@next/swc-linux-arm64-gnu@npm:14.2.4": + version: 14.2.4 + resolution: "@next/swc-linux-arm64-gnu@npm:14.2.4" conditions: os=linux & cpu=arm64 & libc=glibc languageName: node linkType: hard -"@next/swc-linux-arm64-musl@npm:14.1.3": - version: 14.1.3 - resolution: "@next/swc-linux-arm64-musl@npm:14.1.3" +"@next/swc-linux-arm64-musl@npm:14.2.4": + version: 14.2.4 + resolution: "@next/swc-linux-arm64-musl@npm:14.2.4" conditions: os=linux & cpu=arm64 & libc=musl languageName: node linkType: hard -"@next/swc-linux-x64-gnu@npm:14.1.3": - version: 14.1.3 - resolution: "@next/swc-linux-x64-gnu@npm:14.1.3" +"@next/swc-linux-x64-gnu@npm:14.2.4": + version: 14.2.4 + resolution: "@next/swc-linux-x64-gnu@npm:14.2.4" conditions: os=linux & cpu=x64 & libc=glibc languageName: node linkType: hard -"@next/swc-linux-x64-musl@npm:14.1.3": - version: 14.1.3 - resolution: "@next/swc-linux-x64-musl@npm:14.1.3" +"@next/swc-linux-x64-musl@npm:14.2.4": + version: 14.2.4 + resolution: "@next/swc-linux-x64-musl@npm:14.2.4" conditions: os=linux & cpu=x64 & libc=musl languageName: node linkType: hard -"@next/swc-win32-arm64-msvc@npm:14.1.3": - version: 14.1.3 - resolution: "@next/swc-win32-arm64-msvc@npm:14.1.3" +"@next/swc-win32-arm64-msvc@npm:14.2.4": + version: 14.2.4 + resolution: "@next/swc-win32-arm64-msvc@npm:14.2.4" conditions: os=win32 & cpu=arm64 languageName: node linkType: hard -"@next/swc-win32-ia32-msvc@npm:14.1.3": - version: 14.1.3 - resolution: "@next/swc-win32-ia32-msvc@npm:14.1.3" +"@next/swc-win32-ia32-msvc@npm:14.2.4": + version: 14.2.4 + resolution: "@next/swc-win32-ia32-msvc@npm:14.2.4" conditions: os=win32 & cpu=ia32 languageName: node linkType: hard -"@next/swc-win32-x64-msvc@npm:14.1.3": - version: 14.1.3 - resolution: "@next/swc-win32-x64-msvc@npm:14.1.3" +"@next/swc-win32-x64-msvc@npm:14.2.4": + version: 14.2.4 + resolution: "@next/swc-win32-x64-msvc@npm:14.2.4" conditions: os=win32 & cpu=x64 languageName: node linkType: hard @@ -3995,12 +3995,20 @@ __metadata: languageName: node linkType: hard -"@swc/helpers@npm:0.5.2": - version: 0.5.2 - resolution: "@swc/helpers@npm:0.5.2" +"@swc/counter@npm:^0.1.3": + version: 0.1.3 + resolution: "@swc/counter@npm:0.1.3" + checksum: 10/df8f9cfba9904d3d60f511664c70d23bb323b3a0803ec9890f60133954173047ba9bdeabce28cd70ba89ccd3fd6c71c7b0bd58be85f611e1ffbe5d5c18616598 + languageName: node + linkType: hard + +"@swc/helpers@npm:0.5.5": + version: 0.5.5 + resolution: "@swc/helpers@npm:0.5.5" dependencies: + "@swc/counter": "npm:^0.1.3" tslib: "npm:^2.4.0" - checksum: 10/3a3b179b3369acd26c5da89a0e779c756ae5231eb18a5507524c7abf955f488d34d86649f5b8417a0e19879688470d06319f5cfca2273d6d6b2046950e0d79af + checksum: 10/1c5ef04f642542212df28c669438f3e0f459dcde7b448a5b1fcafb2e9e4f13e76d8428535a270e91ed123dd2a21189dbed34086b88a8cf68baf84984d6d0e39b languageName: node linkType: hard @@ -5473,7 +5481,7 @@ __metadata: copy-webpack-plugin: "npm:^12.0.2" eslint: "npm:^8.57.0" eslint-config-xmtp-web: "workspace:*" - next: "npm:14.1.3" + next: "npm:14.2.4" prettier: "npm:^3.2.5" react: "npm:^18" react-dom: "npm:^18" @@ -13030,21 +13038,21 @@ __metadata: languageName: node linkType: hard -"next@npm:14.1.3": - version: 14.1.3 - resolution: "next@npm:14.1.3" +"next@npm:14.2.4": + version: 14.2.4 + resolution: "next@npm:14.2.4" dependencies: - "@next/env": "npm:14.1.3" - "@next/swc-darwin-arm64": "npm:14.1.3" - "@next/swc-darwin-x64": "npm:14.1.3" - "@next/swc-linux-arm64-gnu": "npm:14.1.3" - "@next/swc-linux-arm64-musl": "npm:14.1.3" - "@next/swc-linux-x64-gnu": "npm:14.1.3" - "@next/swc-linux-x64-musl": "npm:14.1.3" - "@next/swc-win32-arm64-msvc": "npm:14.1.3" - "@next/swc-win32-ia32-msvc": "npm:14.1.3" - "@next/swc-win32-x64-msvc": "npm:14.1.3" - "@swc/helpers": "npm:0.5.2" + "@next/env": "npm:14.2.4" + "@next/swc-darwin-arm64": "npm:14.2.4" + "@next/swc-darwin-x64": "npm:14.2.4" + "@next/swc-linux-arm64-gnu": "npm:14.2.4" + "@next/swc-linux-arm64-musl": "npm:14.2.4" + "@next/swc-linux-x64-gnu": "npm:14.2.4" + "@next/swc-linux-x64-musl": "npm:14.2.4" + "@next/swc-win32-arm64-msvc": "npm:14.2.4" + "@next/swc-win32-ia32-msvc": "npm:14.2.4" + "@next/swc-win32-x64-msvc": "npm:14.2.4" + "@swc/helpers": "npm:0.5.5" busboy: "npm:1.6.0" caniuse-lite: "npm:^1.0.30001579" graceful-fs: "npm:^4.2.11" @@ -13052,6 +13060,7 @@ __metadata: styled-jsx: "npm:5.1.1" peerDependencies: "@opentelemetry/api": ^1.1.0 + "@playwright/test": ^1.41.2 react: ^18.2.0 react-dom: ^18.2.0 sass: ^1.3.0 @@ -13077,11 +13086,13 @@ __metadata: peerDependenciesMeta: "@opentelemetry/api": optional: true + "@playwright/test": + optional: true sass: optional: true bin: next: dist/bin/next - checksum: 10/6e77d5d35161b1e9337112ce7864527029f5c8e25ddd29e07e8a730c83f7241dd241e7eb0bdcd006e813b610274e960e0af18c167ab8a2deeeb7776121a7d770 + checksum: 10/5bf2ccb4c6b0076a61b875a1112d34a31f5afc9d5f2676acf6c8151b425c38d289b951de70b598ad6ed9fa6be5fa3c215d1d9b462ba2b72075cb80501fd9fd07 languageName: node linkType: hard