@nola-lang/next
v0.1.4
Published
Next.js integration for Nola (.tsi): withNola config wrapper, webpack + Turbopack loaders
Maintainers
Readme
@nola-lang/next
Next.js integration for Nola .tsi modules.
// next.config.mjs
import { withNola } from "@nola-lang/next";
export default withNola({
// your Next config
});What withNola wires up:
- webpack mode:
.tsilowering in server compilations (via@nola-lang/unplugin), including auto-wiringnola.config.tsand emitting the adjacent*.d.tsi.tsdeclarations thatnext build's type check needs. - Turbopack: a
*.tsirule through the bundled loader (next dev --turbopack). - Client guard: importing
.tsifrom client code fails withNOLA4001— Nola is server-only in v0. Use server components, route handlers, or server actions. - Runtime singleton: adds
@nola-lang/runtimetoserverExternalPackages. - NodeNext resolution:
resolve.extensionAliasfor./x.js→x.ts.
Enable "allowArbitraryExtensions": true in your tsconfig.json so tsc
resolves .tsi imports through the generated declarations, and gitignore
*.d.tsi.ts.
