Skip to content

Commit

Permalink
deps fix
Browse files Browse the repository at this point in the history
  • Loading branch information
probablyangg committed Jan 3, 2025
1 parent 9fad9c4 commit 2ee320b
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 1 deletion.
37 changes: 37 additions & 0 deletions apps/demo-app/next.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,40 @@
/** @type {import('next').NextConfig} */
const webpack = require("webpack");

module.exports = {
reactStrictMode: true,
transpilePackages: [
"@burnt-labs/abstraxion",
"@burnt-labs/abstraxion-core",
"@burnt-labs/signers",
"@keplr-wallet/crypto",
"tough-cookie",
"fetch-cookie",
"starknet",
],
webpack: (config, { isServer }) => {
if (!isServer) {
// Polyfill node: protocol imports
config.plugins.push(
new webpack.NormalModuleReplacementPlugin(/^node:/, (resource) => {
resource.request = resource.request.replace(/^node:/, "");
}),
);

config.resolve = {
...config.resolve,
fallback: {
...config.resolve.fallback,
url: require.resolve("url/"),
crypto: require.resolve("crypto-browserify"),
stream: require.resolve("stream-browserify"),
buffer: require.resolve("buffer/"),
util: require.resolve("util/"),
http: require.resolve("stream-http"),
https: require.resolve("https-browserify"),
},
};
}
return config;
},
};
9 changes: 8 additions & 1 deletion apps/demo-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,16 @@
"@types/react": "^18.2.47",
"@types/react-dom": "^18.2.18",
"autoprefixer": "^10.4.13",
"buffer": "^6.0.3",
"crypto-browserify": "^3.12.1",
"eslint-config-next": "14.0.4",
"https-browserify": "^1.0.0",
"postcss": "^8.4.20",
"stream-browserify": "^3.0.0",
"stream-http": "^3.2.0",
"tailwindcss": "^3.2.4",
"typescript": "^5.2.2"
"typescript": "^5.2.2",
"url": "^0.11.4",
"util": "^0.12.5"
}
}

0 comments on commit 2ee320b

Please sign in to comment.