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: add possibililty for one root file entry #148

Closed
blanklob opened this issue Aug 17, 2024 · 7 comments
Closed

feat: add possibililty for one root file entry #148

blanklob opened this issue Aug 17, 2024 · 7 comments

Comments

@blanklob
Copy link

blanklob commented Aug 17, 2024

hey, is there a possible way we could have a root file entry? like for example one entrypoint file in the root of the theme:

assets
config
..
.shopifyignore
entry.js
package.json

Instead of a folder? that way I can import my css from the entry.js file and use it as entrypoint, I tried with current config options but it seamed impossible.

Inside the entry file I will call my components and modules.

import './styles.css'
import './components'

...

thanks!

@blanklob
Copy link
Author

@montalvomiguelo if you have any thoughts!

@montalvomiguelo
Copy link
Collaborator

Youness! 🙂 I just created a little example with one entry at the theme's root for you. Please let me know if that helps

@blanklob
Copy link
Author

hey @montalvomiguelo here is my current example, I didn't manage to get it to work with your setup odestry/theme-starter#2

@blanklob
Copy link
Author

Do you also know how can i get rid of the auto generated dot vite folder thanks!

Capture d’écran 2024-08-17 à 22 53 46

@montalvomiguelo
Copy link
Collaborator

montalvomiguelo commented Aug 17, 2024

Let's try adding a / when loading the entry point since it's at the theme's root

-    {% render 'entry' with 'theme.entry.js' %}
+    {% render 'entry' with '/entry.theme.js' %}

Usually, I ignore the .vite stuff in my .shopifyignore file, It could be added to .gitignore as well

@blanklob
Copy link
Author

oh yeah that worked thanks as well, how do you usually handle deploying, do you ignore the assets folder? and have a CI with shopify theme push or use Github integration?

@montalvomiguelo
Copy link
Collaborator

I personally prefer using the Shopify GitHub Integration for deployments, with a standard theme directory structure. I don't ignore the assets folder.

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

No branches or pull requests

2 participants