-
Notifications
You must be signed in to change notification settings - Fork 264
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
27 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
--- | ||
'@shopify/cli-hydrogen': minor | ||
--- | ||
|
||
Add experimental support for Vite projects. | ||
|
||
In the Vite config of you Vite<>Remix project, import and use the new experimental Hydrogen and Oxygen plugins, and include them before Remix: | ||
|
||
```ts | ||
import {defineConfig} from 'vite'; | ||
import {hydrogen, oxygen} from '@shopify/cli-hydrogen/experimental-vite'; | ||
import {vitePlugin as remix} from '@remix-run/dev'; | ||
import tsconfigPaths from 'vite-tsconfig-paths'; | ||
|
||
export default defineConfig({ | ||
plugins: [ | ||
hydrogen(), // Adds utilities like GraphiQL and Subrequest Profiler | ||
oxygen(), // Runs your app using the MiniOxygen runtime (closer to production) | ||
remix({buildDirectory: 'dist'}), // Use `dist` to be compatible with `h2 deploy` | ||
tsconfigPaths(), | ||
], | ||
}); | ||
``` | ||
|
||
Then, run `h2 dev-vite` and `h2 build-vite` commands to start and build your app. | ||
|
||
Please report any issue with this new feature, and let us know if you have any feedback or suggestions. |