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

[Feature / cli] Add template / option for solidjs in cli #12218

Closed
4 tasks done
ampmonteiro opened this issue Feb 27, 2023 · 11 comments · Fixed by #12241
Closed
4 tasks done

[Feature / cli] Add template / option for solidjs in cli #12218

ampmonteiro opened this issue Feb 27, 2023 · 11 comments · Fixed by #12241
Labels

Comments

@ampmonteiro
Copy link

Description

Since all almost well known frameworks / libraries exist as template in vite, the only that is missing is solidjs.

Since official way of install solidjs, from solid website, already use vite,
i think make sense also exist in vite cli as a template.

As it has a benefit for solidjs itself, since it could turn into official way as well and would be centralized in vite, instead of using

npx degit solidjs/templates/js my-app

thanks

Suggested solution

Just add their template js and ts into vite cli options.

Alternative

No response

Additional context

No response

Validations

@fi3ework
Copy link
Member

IMO it's a good idea, and an interesting thing I found that there are already template-ssr-solid and template-ssr-solid-ts in https://github.com/bluwy/create-vite-extra but lack a template-solid 😜. Was it intentional? @bluwy

@bluwy
Copy link
Member

bluwy commented Feb 28, 2023

I wanted to add solid templates to create-vite-extra but never got around adding them, but for solid's case, I think we discussed before that it's probably fine to add it in create-vite directly.

@github-actions
Copy link

Hello @ampmonteiro. We like your proposal/feedback and would appreciate a contribution via a Pull Request by you or another community member. We thank you in advance for your contribution and are looking forward to reviewing it!

@fi3ework
Copy link
Member

https://discord.com/channels/804011606160703521/902594605512548442/1065513317386420255 FYI, found a discussion about this lately.

@ampmonteiro
Copy link
Author

Hi,

solidjs team already create the plugins with js and ts for vite 4, if you see the Getting Started page of solidjs website and installed in your machine like i did.

here the js template vite config:

import { defineConfig } from 'vite';
import solidPlugin from 'vite-plugin-solid';

export default defineConfig({
  plugins: [solidPlugin()],
  server: {
    port: 3000,
  },
  build: {
    target: 'esnext',
    },
  },
});

My recommendations is someone of vite team talk to someone of solidjs team.

@AbdelrahmanDwedar
Copy link
Contributor

Hi,

solidjs team already create the plugins with js and ts for vite 4, if you see the Getting Started page of solidjs website and installed in your machine like i did.

here the js template vite config:

import { defineConfig } from 'vite';
import solidPlugin from 'vite-plugin-solid';

export default defineConfig({
  plugins: [solidPlugin()],
  server: {
    port: 3000,
  },
  build: {
    target: 'esnext',
    },
  },
});

My recommendations is someone of vite team talk to someone of solidjs team.

Does the exact same work for typescript version?

@ampmonteiro
Copy link
Author

ampmonteiro commented Mar 2, 2023

Hi @AbdelrahmanDwedar ,

it seams that you already have the answer, since you already start a pull request.

Another thing i would like to say is that the templates ( js and ts) should, in my opinion, have same structure (like adding the public folder and components folder) and use as a demo the counter app.
thanks.

@AbdelrahmanDwedar
Copy link
Contributor

We did that things but I don't think that the vite team wants the components directory. They seem to have everything as simple & as lightweight as possible.

We followed the same structure as the React app, the exact same one even the images places.

@ampmonteiro
Copy link
Author

ampmonteiro commented Mar 3, 2023

@AbdelrahmanDwedar,

ok, In react and preact templates, the component folder does not exist.

Only thing missing is / was public folder.

@AbdelrahmanDwedar
Copy link
Contributor

The public folder was added and the template should be good right now.

There's just a problem with the rumtime kn Windows, tried to search for the reason behind that.

@ampmonteiro
Copy link
Author

@AbdelrahmanDwedar

ok, thanks.

bluwy added a commit that referenced this issue Jul 3, 2023
Co-authored-by: Arnaud Barré <arnaud.barre72@gmail.com>
Co-authored-by: bluwy <bjornlu.dev@gmail.com>
xinxinhe1810 pushed a commit to xinxinhe1810/vite that referenced this issue Jul 4, 2023
Co-authored-by: Arnaud Barré <arnaud.barre72@gmail.com>
Co-authored-by: bluwy <bjornlu.dev@gmail.com>
@github-actions github-actions bot locked and limited conversation to collaborators Jul 18, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
4 participants