From ffd0423385c3ba069ca826caa35e0636f902cdc3 Mon Sep 17 00:00:00 2001 From: dblodorn Date: Thu, 22 Sep 2022 15:28:11 -0400 Subject: [PATCH 1/2] remove reference to development package in next app --- examples/nextjs-dapp/package.json | 1 - 1 file changed, 1 deletion(-) diff --git a/examples/nextjs-dapp/package.json b/examples/nextjs-dapp/package.json index a59fd53..66f5736 100644 --- a/examples/nextjs-dapp/package.json +++ b/examples/nextjs-dapp/package.json @@ -12,7 +12,6 @@ "clean": "rimraf --no-glob .next" }, "dependencies": { - "@derpyvision/fly-package": "workspace:^", "@rainbow-me/rainbowkit": "^0.6.0", "@zoralabs/nft-hooks": "^1.1.9", "@zoralabs/zdk": "^2.1.8", From 53bad36f1fe4699bb203696121f250c42729bdb4 Mon Sep 17 00:00:00 2001 From: dblodorn Date: Thu, 22 Sep 2022 15:41:37 -0400 Subject: [PATCH 2/2] add next transpile modules --- examples/nextjs-dapp/next.config.js | 8 +++----- examples/nextjs-dapp/package.json | 1 + yarn.lock | 23 ++++++++++++++++++++++- 3 files changed, 26 insertions(+), 6 deletions(-) diff --git a/examples/nextjs-dapp/next.config.js b/examples/nextjs-dapp/next.config.js index 2d364ea..4642280 100644 --- a/examples/nextjs-dapp/next.config.js +++ b/examples/nextjs-dapp/next.config.js @@ -1,10 +1,8 @@ -/** @type {import('next').NextConfig} */ +const withTM = require('next-transpile-modules')(['@derpyvision/fly-package']); // pass the modules you would like to see transpiled + const nextConfig = { reactStrictMode: true, swcMinify: true, - experimental: { - externalDir: true, - }, webpack: (config) => { config.module.rules.push({ test: /\.(md|mdx)?$/, @@ -20,4 +18,4 @@ const nextConfig = { }, } -module.exports = nextConfig +module.exports = withTM({nextConfig}) diff --git a/examples/nextjs-dapp/package.json b/examples/nextjs-dapp/package.json index 66f5736..55bae45 100644 --- a/examples/nextjs-dapp/package.json +++ b/examples/nextjs-dapp/package.json @@ -17,6 +17,7 @@ "@zoralabs/zdk": "^2.1.8", "ethers": "^5.7.1", "next": "^12.3.0", + "next-transpile-modules": "^9.0.0", "react": "^18.2.0", "react-dom": "^18.2.0", "swr": "^1.3.0", diff --git a/yarn.lock b/yarn.lock index 320d686..4754e3b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4316,6 +4316,14 @@ encode-utf8@^1.0.3: resolved "https://registry.yarnpkg.com/encode-utf8/-/encode-utf8-1.0.3.tgz#f30fdd31da07fb596f281beb2f6b027851994cda" integrity sha512-ucAnuBEhUK4boH2HjVYG5Q2mQyPorvv0u/ocS+zhdw0S8AlHYY+GOFhP1Gio5z4icpP2ivFSvhtFjQi8+T9ppw== +enhanced-resolve@^5.7.0: + version "5.10.0" + resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.10.0.tgz#0dc579c3bb2a1032e357ac45b8f3a6f3ad4fb1e6" + integrity sha512-T0yTFjdpldGY8PmuXXR0PyQ1ufZpEGiHVrp7zHKB7jdR4qlmZHhONVM5AQOAWXuF/w3dnHbEQVrNptJgt7F+cQ== + dependencies: + graceful-fs "^4.2.4" + tapable "^2.2.0" + enquirer@^2.3.0, enquirer@^2.3.6: version "2.3.6" resolved "https://registry.yarnpkg.com/enquirer/-/enquirer-2.3.6.tgz#2a7fe5dd634a1e4125a975ec994ff5456dc3734d" @@ -5209,7 +5217,7 @@ globby@^11.0.0, globby@^11.1.0: merge2 "^1.4.1" slash "^3.0.0" -graceful-fs@^4.1.2, graceful-fs@^4.1.5, graceful-fs@^4.1.6, graceful-fs@^4.2.0: +graceful-fs@^4.1.2, graceful-fs@^4.1.5, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.4: version "4.2.10" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.10.tgz#147d3a006da4ca3ce14728c7aefc287c367d7a6c" integrity sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA== @@ -6680,6 +6688,14 @@ natural-compare@^1.4.0: resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" integrity sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw== +next-transpile-modules@^9.0.0: + version "9.0.0" + resolved "https://registry.yarnpkg.com/next-transpile-modules/-/next-transpile-modules-9.0.0.tgz#133b1742af082e61cc76b02a0f12ffd40ce2bf90" + integrity sha512-VCNFOazIAnXn1hvgYYSTYMnoWgKgwlYh4lm1pKbSfiB3kj5ZYLcKVhfh3jkPOg1cnd9DP+pte9yCUocdPEUBTQ== + dependencies: + enhanced-resolve "^5.7.0" + escalade "^3.1.1" + next@^12.3.0: version "12.3.1" resolved "https://registry.yarnpkg.com/next/-/next-12.3.1.tgz#127b825ad2207faf869b33393ec8c75fe61e50f1" @@ -8076,6 +8092,11 @@ tailwindcss@^3.1.8: quick-lru "^5.1.1" resolve "^1.22.1" +tapable@^2.2.0: + version "2.2.1" + resolved "https://registry.yarnpkg.com/tapable/-/tapable-2.2.1.tgz#1967a73ef4060a82f12ab96af86d52fdb76eeca0" + integrity sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ== + term-size@^2.1.0, term-size@^2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/term-size/-/term-size-2.2.1.tgz#2a6a54840432c2fb6320fea0f415531e90189f54"