Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
965bdb2
feat: add `Argent` one button connector to `next`
Oct 31, 2024
87521ff
chore: ignore `.idea`
Oct 31, 2024
50ac63a
chore: ignore ts error
Oct 31, 2024
5a411cb
chore: bump `starknetkit-next` to `v2.4.0-beta.3`
Nov 1, 2024
160b746
fix: react warning
Nov 1, 2024
c6fbc70
chore: bump `starknetkit-next` to `v2.4.0-beta.4`
Nov 1, 2024
d003b03
chore: bump `@argent/x-sessions` to `6.7.10`
Nov 6, 2024
db52571
chore: commit `pnpm-lock.yaml`
Nov 6, 2024
796738f
chore: generate fresh `pnpm-lock.yaml`
Nov 6, 2024
771adbe
fix: package error
Nov 6, 2024
4d6e79f
chore: downgrade `@chakra-ui/react`, remove `@emotion/*`
Nov 6, 2024
58ca413
chore: update `starknetkit` to `v2.4.0-beta.6`, adapt usage
Nov 7, 2024
a95b204
chore: remove `packageManager` from `package.json`
Nov 8, 2024
5c50e86
chore: add `BraavosMobileConnector`
Nov 13, 2024
6efdafa
chore: bump `starknetkit-next` to `2.5.0-beta.1`
Nov 13, 2024
4ef6c84
feat: add script for hot reloading local packages
Nov 14, 2024
67be021
fix: skip hot reloading packages that are not locally imported
Nov 14, 2024
4149d8b
Merge pull request #57 from argentlabs/feat/hot-reload-local-packages
Nov 14, 2024
5cc714a
chore: install `starknetkit@2.5.0-beta.2`
Nov 15, 2024
d2de42f
chore: set `starknetkit-latest` to `v2.6.1`
Dec 10, 2024
af73242
refactor: `starknetkit-latest` for usage of `v2.6.1`
Dec 10, 2024
9c3f3c4
feat: bump `starknetkit-next` to `2.7.0-beta.3`
Jan 21, 2025
3d8784b
feat: fix build errors
Jan 21, 2025
956c496
chore: bump `starknetkit-next` version
Jan 27, 2025
e170175
chore: bump `starknetkit-next` version
Jan 31, 2025
6059e81
chore: bump `starknetkit-next` version
Jan 31, 2025
0f41cc6
chore: bump `starknetkit-next` version
Feb 18, 2025
063a8ae
chore: bump `starknetkit-next` version
Feb 20, 2025
dab9c47
chore: bump `starknetkit-next` version
Feb 20, 2025
f2b7f6d
refactor: use `StarknetReactWrapper` in snkit + snreact
Mar 12, 2025
0992eeb
fix: ts issues
Mar 12, 2025
dacee38
chore: bump `starknetkit-next` version
Mar 12, 2025
b0c6045
chore: bump `starknetkit-next` version
Mar 20, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -129,3 +129,4 @@ dist
.yarn/install-state.gz
.pnp.*
.vercel
.idea
57 changes: 57 additions & 0 deletions next.config.mjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
/** @type {import('next').NextConfig} */
import p from "./package.json" assert { type: "json" }
import path from "path"
import { fileURLToPath } from "url"
import { createRequire } from "module"

const require = createRequire(import.meta.url)

const starknetkitNextVersion = Object.entries(p.dependencies)
.find((dep) => dep[0] === "starknetkit-next")[1]
Expand All @@ -24,6 +29,13 @@ const starknetReactNextVersion = Object.entries(p.dependencies)
.replace("npm:", "")
.split("@")[2]

const localPackages = [
{
name: "starknetkit-next",
path: "../starknetkit",
},
]

const nextConfig = {
productionBrowserSourceMaps: true,
env: {
Expand All @@ -32,6 +44,51 @@ const nextConfig = {
starknetReactVersion,
starknetReactNextVersion,
},
webpack: (config, { dev, webpack }) => {
if (!dev) {
return config
}

const __filename = fileURLToPath(import.meta.url)
const __dirname = path.dirname(__filename)
const packageJson = require(path.join(__dirname, "./package.json"))

config.resolve.alias = {
...config.resolve.alias,
...localPackages.reduce((aliases, pkg) => {
if (packageJson.dependencies[pkg.name].startsWith("file:")) {
return {
...aliases,
[pkg.name]: path.resolve(__dirname, pkg.path),
[`${pkg.name}/(.*)`]: path.resolve(__dirname, `${pkg.path}/$1`),
}
}

return { ...aliases }
}, {}),
}

localPackages.forEach((pkg) => {
if (!packageJson.dependencies[pkg.name].startsWith("file:")) {
return
}
config.plugins.push(
new webpack.NormalModuleReplacementPlugin(
new RegExp(`^${pkg.name}(\\/.*)?$`),
(resource) => {
const requestPath = resource.request.replace(pkg.name, "")
resource.request = path.resolve(
__dirname,
`${pkg.path}${requestPath}`,
)
resource.context = path.dirname(resource.request)
},
),
)
})

return config
},
}

export default nextConfig
10 changes: 4 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,9 @@
"format": "prettier --write ."
},
"dependencies": {
"@argent/x-sessions": "^6.7.8",
"@argent/x-sessions": "^6.7.10",
"@argent/x-shared": "^1.32.1",
"@chakra-ui/react": "^2.8.2",
"@emotion/react": "^11.11.4",
"@emotion/styled": "^11.11.5",
"@chakra-ui/react": "2.8.2",
"@starknet-io/types-js": "^0.7.7",
"@starknet-react/chains": "^0.1.7",
"@starknet-react/core": "^2.8.2",
Expand All @@ -28,11 +26,11 @@
"popmotion": "^11.0.5",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"starknet": "^6.11.0",
"starknet": "^6.23.1",
"starknet-react-chains-next": "npm:@starknet-react/chains@3.0.0-beta.3",
"starknet-react-core-next": "npm:@starknet-react/core@3.0.1-beta.0",
"starknetkit-latest": "npm:starknetkit@^1.1.9",
"starknetkit-next": "npm:starknetkit@^2.3.1"
"starknetkit-next": "npm:starknetkit@2.11.0-beta.2"
},
"devDependencies": {
"@types/lodash-es": "^4.17.12",
Expand Down
Loading