fresh icon indicating copy to clipboard operation
fresh copied to clipboard

Deprecation of the legacy `Builder` API

Open csvn opened this issue 1 month ago • 0 comments

In the Fresh docs the Builder API is described as "legacy".

The Builder class was used during the alpha phase of Fresh 2 before the Fresh vite plugin was released. You can skip this page if you’re using vite.

Does it make sense to deprecate this API officially, to discourage new users from this API? It might make sense also to update the OPTIONS when using @fresh/init to mention that the --builder is legacy, or deprecated if that route is chosen.

    --builder    (Legacy) Setup with builder instead of vite

I think that unless there's any blockers with the Vite plugin, it's better to deprecate ASAP, to clearly signal that this path should be moved away from.

Deprecations

If it makes sense to deprecate, I think these are the public API's that should add @deprecated JSDoc:

  • @fresh/core/dev - All public exports
    • Builder and all related types
  • @fresh/plugin-tailwind - All public exports, since this plugin is only used with Builder
  • @fresh/plugin-tailwind-v1 - All public exports, since this plugin is only used with Builder

In addition, to make it clearer that this is not recommended for new projects, maybe add the following:

  • A warning message if --builder is used with @fresh/init
  • Update the option text for --builder to mark it as deprecated

csvn avatar Nov 20 '25 15:11 csvn