-
Notifications
You must be signed in to change notification settings - Fork 137
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
Migrate project to Vite for asset bundling #167
base: dev
Are you sure you want to change the base?
Conversation
Hey guys, at barrel created a Vite/Shopify plugin that I think you will love (: vite-plugin-shopify.mp4 |
@montalvomiguelo what's the github repo? would like to take a look |
I wanted to follow up on this, is there anything you want me to change/talk about before this can be approved? |
when is this going to be approved? |
+1 would love to see this implemented! |
+1 this is just what I'm missing from the current implementation |
+1 |
1 similar comment
+1 |
Adapted OP's Vite implementation for use with Alpine.js if anyone wants to check it out here. Havn't got it working with Shopify CLI v3 yet. |
The project currently uses webpack for assets bundling but there's an interest in switching to Vite. This PR attempts to do that migration. I first tested this on the foundation theme (you can see my repo fork here) and things worked correctly.
One major thing that the migration to Vite changed is that Vite doesn't use
.browserslistrc
for setting browser compatibility, it usesesbuild
instead so the.config/.browserslistrc
file is not needed.Besides that, I tried my best to replace all the webpack-specific functionality using Vite plugins and configurations.
I know this is a significant change and I'm open to discussing how to best approach it. I just wanted to demonstrate that migrating to Vite is possible and worthwhile.
What kind of change does this PR introduce? (check at least one)
Does this PR introduce a breaking change? (check one)
If yes, please describe the impact and migration path for existing applications:
The PR fulfills these requirements:
dev
branch, not themain
branchIf adding a new feature, the PR's description includes:
Other information: