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

Add unstable_tailwind and unstable_postcss to changesets #751

Merged
merged 2 commits into from
Apr 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions .changeset/famous-candles-begin.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
'@shopify/hydrogen': patch
---

Adopt Remix [`unstable_tailwind`](https://remix.run/docs/en/1.15.0/guides/styling#built-in-tailwind-support) and [`unstable_postcss`](https://remix.run/docs/en/1.15.0/guides/styling#built-in-postcss-support) future flags for the Demo Store template.

### `unstable_tailwind` and `unstable_postcss` migration steps

1. Move the file `<root>/styles/app.css` to `<root>/app/styles/app.css`, and remove it from `.gitignore`.

2. Add `"browserslist": ["defaults"]` to your `package.json`, or your preferred [value from Browserslist](https://browsersl.ist/).

3. Replace the `build` and `dev` scripts in your `package.json` with the following:

**Before**

```json
"scripts": {
"build": "npm run build:css && shopify hydrogen build",
"build:css": "postcss styles --base styles --dir app/styles --env production",
"dev": "npm run build:css && concurrently -g --kill-others-on-fail -r npm:dev:css \"shopify hydrogen dev\"",
"dev:css": "postcss styles --base styles --dir app/styles -w",
...
}
```

**After**

```json
"scripts": {
"dev": "shopify hydrogen dev",
"build": "shopify hydrogen build",
...
}
```

You can also remove dependencies like `concurrently` if you don't use them anywhere else.
2 changes: 1 addition & 1 deletion .changeset/tidy-papayas-check.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
'@shopify/cli-hydrogen': patch
'@shopify/hydrogen': patch
---

Adopt Remix [`v2_errorBoundary`](https://remix.run/docs/en/release-next/route/error-boundary-v2) future flag
Expand Down