-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
documented the qwik-labs move of insights
- Loading branch information
Showing
2 changed files
with
38 additions
and
1 deletion.
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,35 @@ | ||
--- | ||
'@qwik.dev/core': major | ||
--- | ||
|
||
`qwik-labs` package has been removed in favor of experimental features. | ||
So the "Insights" vite plugin and components have been moved to core as an experimental feature. | ||
|
||
In order to use it, you need to - | ||
|
||
**1)** add `insights` to the experimental array in `vite.config.ts`: | ||
|
||
```ts | ||
qwikVite({ | ||
experimental: ['insights'] | ||
}), | ||
``` | ||
|
||
**2)** Import and use the `qwikInsights` vite plugin from `@qwik.dev/core/insights/vite`: | ||
|
||
```ts | ||
import { qwikInsights } from '@qwik.dev/core/insights/vite'; | ||
``` | ||
|
||
**3)** import the `<Insights>` component from `@qwik.dev/core/insights` and use it in your `root.tsx` file: : | ||
|
||
```tsx title="root.tsx" | ||
import { Insights } from '@qwik.dev/core/insights'; | ||
|
||
// ...rest of root.tsx file | ||
|
||
return ( | ||
<Insights publicApiKey="..." postUrl="..." /> | ||
/* ...qwik app */ | ||
); | ||
``` |
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