feat(template): modernize runtime and tooling defaults#309
feat(template): modernize runtime and tooling defaults#309codebycarson merged 2 commits intomainfrom
Conversation
🦋 Changeset detectedLatest commit: 7536762 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
Pull request overview
This PR modernizes the Next.js starter template in create-sei by switching to Bun as the recommended package manager, migrating linting/formatting from ESLint to Biome v2, upgrading Tailwind configuration to the v4 CSS-first approach, and improving chain selection and wallet integration.
Changes:
- Tooling modernization: Biome v2 replaces ESLint, Bun replaces npm/yarn,
prebuildlinting gate added, andbiome.jsonupdated to v2 schema/API. - Tailwind v4 migration: Theme values moved from
tailwind.config.jsto CSS@themeinglobals.css;tailwind.config.jsis now empty. - Chain/wallet improvements: Explicit
seiDevnetchain defined viaviem, chain selection defaulting to mainnet, and<img>replaced with Next.js<Image>inshell.tsx.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
biome.json |
Upgraded to Biome v2 schema, updated organizeImports to new assist API, added CSS Tailwind directive support, changed quote style to double |
package.json |
Added @biomejs/biome as dev dependency, added prebuild script |
next.config.mjs |
Skip ESLint during builds, added cdn.sei.io remote image pattern |
globals.css |
Migrated from @tailwind directives to @import "tailwindcss" + @theme |
tailwind.config.js |
Emptied; custom theme values moved to CSS |
providers.tsx |
Custom seiDevnet definition, mainnet default, double-quote style alignment |
shell.tsx |
Replaced <img> with <Image>, double-quote style alignment |
.env.example |
Updated comment to reflect mainnet default |
README.md |
Updated install/dev commands to use Bun |
.eslintrc.json |
Emptied (ESLint replaced by Biome) |
.rsyncignore |
Removed .yarn/ and yarn.lock entries |
Comments suppressed due to low confidence (1)
packages/create-sei/templates/next-template/src/components/providers/providers.tsx:66
- The
getSelectedChainfunction is defined inside theProviderscomponent but reads only fromprocess.env.NEXT_PUBLIC_CHAIN, which is a build-time constant (inlined by Next.js at build time and never changes at runtime). Defining and calling this function inside the component means it is recreated on every render, and theuseMemodependency onchain— which always resolves to the same module-level object — adds unnecessary overhead. Consider movinggetSelectedChain(and thechainconstant it produces) to module level, similar to howqueryClientandconnectorsare already defined at module level.
const getSelectedChain = () => {
const chainName = process.env.NEXT_PUBLIC_CHAIN || "mainnet";
switch (chainName.toLowerCase()) {
case "testnet":
return seiTestnet;
case "devnet":
return seiDevnet;
default:
return sei;
}
};
const chain = getSelectedChain();
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #309 +/- ##
=======================================
Coverage 79.69% 79.69%
=======================================
Files 83 83
Lines 1305 1305
Branches 158 215 +57
=======================================
Hits 1040 1040
+ Misses 265 259 -6
- Partials 0 6 +6 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Improve runtime defaults for create-sei's Next.js template and update Biome settings. Add a .changeset for a patch release. Changes include: - .env.example: clarify default chain behavior and example override (testnet). - biome.json: include *.json and *.md in includes and add ignore patterns (node_modules, dist, .next, .yarn). - Template adjustments: add a prebuild Biome check and include Biome in devDependencies; configure Next.js to allow Sei CDN images and skip ESLint during builds; update provider/shell setup and template docs/configs (README, Tailwind v4 config). These updates align the template with current defaults and improve developer/runtime experience.
This pull request updates the Next.js template in
create-seito modernize the stack, streamline configuration, and improve compatibility with Bun, Biome, and Tailwind v4. The most important changes include switching the default package manager to Bun, updating linting and formatting to use Biome, and migrating Tailwind theme configuration to CSS-first. There are also improvements to chain selection logic and wallet integration, as well as minor code style updates.Tooling and configuration modernization:
README.mdfrom npm/yarn to Bun, reflecting Bun as the recommended package manager..env.exampleto defaultNEXT_PUBLIC_CHAINto mainnet instead of testnet.biome.jsonto v2 schema, adding Biome as a dev dependency, and removing.eslintrc.json. [1] [2] [3] [4] [5] [6]prebuildscript to run Biome checks before building inpackage.json.next.config.mjsto skip ESLint during builds and allow images fromcdn.sei.io.Tailwind and theme configuration:
@themeinglobals.css, and removed custom theme config fromtailwind.config.js(now empty for compatibility). [1] [2]Chain and wallet integration improvements:
seiDevnetchain definition usingviemand improved chain selection logic inproviders.tsxto default to mainnet and use environment variable. [1] [2]Code style and compatibility updates:
providers.tsxandshell.tsxto use double quotes for consistency, and replaced<img>with Next.js<Image>for optimized image loading. [1] [2] [3] [4] [5]Cleanup:
.yarn/andyarn.lockfrom.rsyncignoreto reflect the switch from Yarn to Bun.