Open brillout opened 5 months ago
This would be massive in terms of the company project we're considering vike
for
@tbjgolden How so?
Optional control is something we care about - we'd obviously prefer to trust a preset that others also use but if needs must we'd be able to maintain some custom code
Nothing specific in mind, more of a insurance policy that makes it easier to get sign off on it
Yes, that‘s the idea. In the meantime you can manually eject.
@tbjgolden Also btw. in case that's something your company would be up for, Vike is looking for sponsors. (As a bonus Vike could then, for example, prioritize eject.)
Another use case I can think of is when a user may want to eject specific files, like onRenderHtml.ts
and onRenderClient.ts
, rather than ejecting everything.
For example $ vike eject vike-react onRenderHtml,onRenderClient
would essentially perform the following actions:
node_modules/vike-react/
to the user-land pages/
(or renderer/
).+config.ts
. (May not be necessary ?)Edit
export default {}
.I'm not sure that would work, unless every imported module(in the ejected files) are (re)exported from vike-react
.
I'm not sure that would work, unless every imported module(in the ejected files) are (re)exported from
vike-react
.
Yeah, I think you're right. I've updated my comment.
Here is an example vike-react-styled-components-grommet by @lourot
I worked on this here - https://github.com/vikejs/vike/pull/1798
Description
Make Vike integrations ejectable.
For example
$ vike eject vike-react-apollo
would essentially do two things:node_modules/vike-react-apollo/
to the user-landpages/
. (Or better yet its TypeScript source code.)vike-react-apollo
frompackage.json#dependencies
.Eject is also nice from a marketing perspecitve as it doubles down on the Optional Control USP.
WIP: https://github.com/vikejs/vike/pull/1798
Prior art: https://github.com/brillout/eject