Skip to content

CLD-1736: Replace DevLink _Builtin imports with native HTML#2

Merged
agustinchiarotto merged 7 commits into
v1from
cld-1736-remove-devlink-component-imports
May 18, 2026
Merged

CLD-1736: Replace DevLink _Builtin imports with native HTML#2
agustinchiarotto merged 7 commits into
v1from
cld-1736-remove-devlink-component-imports

Conversation

@fbaralle
Copy link
Copy Markdown
Collaborator

Summary

The homepage in src/app/page.tsx imported Section, Block, and Link from @/devlink/_Builtin. Those files are user-generated by webflow devlink sync and don't exist in a fresh clone, so next build fails immediately after running this template. This PR removes the broken imports and replaces the markup with native HTML elements (with inline styles) so the project builds and runs out of the box.

This mirrors the equivalent scaffold change in webflow/webflow-cli#589, which already removed these internal component dependencies from the non-DevLink scaffolds shipped via webflow cloud init.

Changes

  • src/app/page.tsx — replaced Section/Block/Link from @/devlink/_Builtin with native <section>/<div>/<a> using inline styles. Dropped \"use client\" (no longer needed). Updated the docs URL to /data-clients/docs/getting-started to match #589.
  • src/app/layout.tsx — updated DevLinkProvider import to use the new @webflow alias: import { DevLinkProvider } from \"@webflow\". The provider still wraps {children} so DevLink stays wired up.
  • tsconfig.json — added \"@webflow\": [\"./webflow\"] to paths so DevLink-exported components can be imported as import { ComponentName } from \"@webflow\" once synced.

DevLinkProvider and the @import \"../devlink/global.css\" in globals.css are intentionally kept — they're part of the DevLink setup users opt into by syncing.

Linked ticket

CLD-1736

Test plan

  • npm install && npm run build succeeds on a fresh clone (verified locally with basePath temporarily set to /app since \"CLOUD_MOUNT_PATH\" is a deploy-time placeholder)
  • Homepage renders the gradient hero and "Get Started" button correctly
  • After running webflow devlink sync, import { ComponentName } from \"@webflow\" resolves and components render

🤖 Generated with Claude Code

paulvmoreau-webflow and others added 7 commits May 18, 2026 09:46
Removed the broken imports of Section, Block, and Link from
@/devlink/_Builtin in src/app/page.tsx — these are user-generated and
don't exist in a fresh clone, so the Next build failed. The homepage now
uses native section/div/a elements with styles extracted into page.css.

Added "@webflow" path alias to tsconfig.json so DevLink components can be
imported as `import { ComponentName } from "@webflow"` once synced, and
updated layout.tsx to use it for DevLinkProvider.

Updated the docs link to /data-clients/docs/getting-started to match the
scaffold change in webflow/webflow-cli#589.
Drops src/app/page.css and inlines the equivalent styles on the section,
heading, paragraph, and link elements. Matches the inline-style convention
used in the homepage before the DevLink components were removed.
The @import "../devlink/global.css" in globals.css breaks the build on a
fresh clone because the file is user-generated by `webflow devlink sync`.
Also corrected the relative path to "../webflow/global.css" so it matches
the devlink-export rootDir in webflow.json once uncommented.
The "@webflow" tsconfig path was pointing at ./webflow, but DevLink
exports to ./src/webflow per webflow.json's `devlink-export.rootDir`.

Also restored the Webflow global styles import in globals.css with the
correct path: ../webflow/css/global.css (the file is generated by the
DevLink export which runs automatically after init).
Removes the dedicated "@webflow" path alias from tsconfig and switches
layout.tsx to import DevLinkProvider via the existing "@/*" alias —
import { DevLinkProvider } from "@/webflow/DevLinkProvider";

Also updates the example-import hint in page.tsx to match.
Switches the side-effect CSS import in layout.tsx back to the idiomatic
sibling-relative form: import "./globals.css";

Next's built-in type defs only declare *.module.css, so plain *.css
side-effect imports raised "Cannot find module or type declarations".
Adds src/types.d.ts with `declare module "*.css";` to cover it.
@fbaralle fbaralle changed the base branch from main to v1 May 18, 2026 15:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants