Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: create farm support ssr or css pre processor template #1221

Open
wants to merge 24 commits into
base: main
Choose a base branch
from

Conversation

CCherry07
Copy link
Member

Description:

BREAKING CHANGE:

Related issue (if exists):

Copy link

changeset-bot bot commented Apr 20, 2024

🦋 Changeset detected

Latest commit: b320a7e

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 8 packages
Name Type
@farmfe/core Minor
@farmfe-examples/react Patch
@farmfe/js-plugin-less Major
@farmfe/js-plugin-postcss Major
@farmfe/js-plugin-sass Major
@farmfe/js-plugin-solid Major
@farmfe/js-plugin-svgr Major
@farmfe/js-plugin-vue Major

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@CCherry07 CCherry07 changed the title feat: disable polyfill when entry is not html feat: create farm support ssr or css pre processor Apr 20, 2024
@CCherry07 CCherry07 changed the title feat: create farm support ssr or css pre processor feat: create farm support ssr or css pre processor template Apr 20, 2024
@CCherry07 CCherry07 added the WIP Working in progress label Apr 21, 2024
@ErKeLost
Copy link
Member

ErKeLost commented Apr 21, 2024

Thanks, I think our create-farm needs to be as simple as possible, the ssr template we can provide to users right out of the box, but we as a framework template, such as css selector should not be necessary, we should provide users with a simple version of template and should not build too many other options. I think hints such as css selectors should be provided by higher-level cli, and we should only need to provide a ssr template at present.

It is also unnecessary to keep the user selective and concise distinction between js and ts. Farm natively supports the compilation of ts and js, and there is almost no difference in the code except for the file suffix.

So we should come to the following conclusion

  • Add ssr template
  • Remove the prompts from the css selector and js template, keeping our default ts mode

@CCherry07 CCherry07 force-pushed the feat-create-react-ssr branch from 6b5da76 to 9b625a5 Compare April 21, 2024 12:43
@CCherry07
Copy link
Member Author

Thanks, I think our create-farm needs to be as simple as possible, the ssr template we can provide to users right out of the box, but we as a framework template, such as css selector should not be necessary, we should provide users with a simple version of template and should not build too many other options. I think hints such as css selectors should be provided by higher-level cli, and we should only need to provide a ssr template at present.

It is also unnecessary to keep the user selective and concise distinction between js and ts. Farm natively supports the compilation of ts and js, and there is almost no difference in the code except for the file suffix.

So we should come to the following conclusion

  • Add ssr template
  • Remove the prompts from the css selector and js template, keeping our default ts mode

I converged the css selector and js template to argv-e

@ErKeLost
Copy link
Member

I'll test these templates later today. Thank you.

@ErKeLost
Copy link
Member

After I merge the template of tauri, I will merge this pr.

@ErKeLost
Copy link
Member

hi @CCherry07
I've taken a closer look at your code, and we need to consider pulling out the entire template right now, because we need to maintain templates for other frameworks such as tauri,electron, and I think we need to consider some of the underlying configurations, which will increase the maintainability of create-farm, because we're not sure what will happen in the future and what users will do with create-farm. I will keep the pr for the time being and make a decision after pulling out the whole template. I think we still need the template of ssr.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
WIP Working in progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants