Deprecation of the legacy `Builder` API
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-
Builderand all related types
-
-
@fresh/plugin-tailwind- All public exports, since this plugin is only used withBuilder -
@fresh/plugin-tailwind-v1- All public exports, since this plugin is only used withBuilder
In addition, to make it clearer that this is not recommended for new projects, maybe add the following:
- A warning message if
--builderis used with@fresh/init - Update the option text for
--builderto mark it as deprecated