-
Notifications
You must be signed in to change notification settings - Fork 267
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
Use Vite in templates and examples #1912
Changes from all commits
2dcdd10
c4e1065
6be5ede
3af3078
a760a72
671d4c2
183f2c1
889ae02
e910faa
4e5e12e
b286fa3
3929c72
ad4a2b7
b94ae2b
4fc648d
9bf6a58
fcaf824
611ac69
48ae7dd
0e39a5b
3eb7b3c
0e2a82b
b8e84fd
4686f33
212b9ac
925f260
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# Hydrogen template: Classic Remix | ||
|
||
Hydrogen is Shopify’s stack for headless commerce. Hydrogen is designed to dovetail with [Remix](https://remix.run/), Shopify’s full stack web framework. This template contains a **minimal setup** of components, queries and tooling to get started with Hydrogen and the [Classic Remix Compiler](https://remix.run/docs/en/main/future/vite#classic-remix-compiler-vs-remix-vite) (i.e. the compiler that uses ESBuild via `@remix-run/dev`, used before Remix Vite). | ||
|
||
[Check out Hydrogen docs](https://shopify.dev/custom-storefronts/hydrogen) | ||
[Get familiar with Remix](https://remix.run/docs/en/v1) | ||
|
||
## What's included | ||
|
||
- Remix | ||
- Hydrogen | ||
- Oxygen | ||
- Shopify CLI | ||
- ESLint | ||
- Prettier | ||
- GraphQL generator | ||
- TypeScript and JavaScript flavors | ||
- Minimal setup of components and routes | ||
|
||
## Getting started | ||
|
||
**Requirements:** | ||
|
||
- Node.js version 18.0.0 or higher | ||
|
||
```bash | ||
npm create @shopify/hydrogen@latest -- --template classic-remix | ||
``` | ||
|
||
## Building for production | ||
|
||
```bash | ||
npm run build | ||
``` | ||
|
||
## Local development | ||
|
||
```bash | ||
npm run dev | ||
``` |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{ | ||
"name": "example-classic-remix", | ||
"private": true, | ||
"type": "commonjs", | ||
"prettier": "@shopify/prettier-config", | ||
"scripts": { | ||
"build": "shopify hydrogen build --diff", | ||
"dev": "shopify hydrogen dev --codegen --customer-account-push --diff", | ||
"preview": "npm run build && shopify hydrogen preview", | ||
"lint": "eslint --no-error-on-unmatched-pattern --ext .js,.ts,.jsx,.tsx .", | ||
"typecheck": "tsc --noEmit", | ||
"codegen": "shopify hydrogen codegen" | ||
}, | ||
"h2:diff": { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not familiar with this new property, I assume this is configuration when the diff is applied, the the vite files in the skeleton template don't end up in the output of this example. Very cool. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, just a quick escape hatch for a few examples due to the migration from ESBuild to Vite. We can probably remove it when we move completely to Vite and remove the classic compiler 🤔 |
||
"skipFiles": [ | ||
"vite.config.ts", | ||
"env.d.ts" | ||
], | ||
"skipDevDependencies": [ | ||
"vite", | ||
"vite-tsconfig-paths" | ||
] | ||
} | ||
} |
This file was deleted.
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was
subscriptions
incorrect? Intentionally change the name tometaobjects
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it's not an example that uses
--diff
. And the build script in this workflow uses--diff
so we should only list here--diff
examples, I think?We were lucky
subscriptions
worked but it may break 😅