mirror of
https://github.com/robbevp/vite-plugin-fathom.git
synced 2026-10-07 21:21:53 +02:00
No description
- TypeScript 87.3%
- JavaScript 12.7%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
Bumps the linting group with 3 updates in the / directory: [eslint](https://github.com/eslint/eslint), [prettier](https://github.com/prettier/prettier) and [typescript-eslint](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/typescript-eslint). Updates `eslint` from 10.9.1 to 10.11.0 - [Release notes](https://github.com/eslint/eslint/releases) - [Commits](https://github.com/eslint/eslint/compare/v10.9.1...v10.11.0) Updates `prettier` from 3.9.6 to 3.9.9 - [Release notes](https://github.com/prettier/prettier/releases) - [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md) - [Commits](https://github.com/prettier/prettier/compare/3.9.6...3.9.9) Updates `typescript-eslint` from 8.68.0 to 8.71.0 - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/typescript-eslint/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.71.0/packages/typescript-eslint) --- updated-dependencies: - dependency-name: eslint dependency-version: 10.11.0 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: linting - dependency-name: prettier dependency-version: 3.9.9 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: linting - dependency-name: typescript-eslint dependency-version: 8.70.1 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: linting ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> |
||
| .github | ||
| src | ||
| .gitignore | ||
| eslint.config.js | ||
| LICENSE | ||
| package.json | ||
| README.md | ||
| tsconfig.json | ||
| vite.config.ts | ||
| yarn.lock | ||
vite-plugin-fathom
A small vite plugin to inject the fathom script on your html page.
Usage
Add the plugin to your vite config. The fathom site id will be loaded from the VITE_FATHOM_ID environment variable by default.
// vite.config.js
import { defineConfig } from "vite";
import vitePluginFathom from "vite-plugin-fathom"
export default defineConfig({
plugins: [vitePluginFathom()],
});
If your want, you can specify the site ID and options:
// vite.config.js
import { defineConfig } from "vite";
import vitePluginFathom from "vite-plugin-fathom"
export default defineConfig({
plugins: [vitePluginFathom("ABCDEF", { forceEU: true })],
});
If the site id isn't passed as an argument or the environment variable is not set, the script will not be added to the head.
Options
| Option | Type | Default |
|---|---|---|
| forceEU | boolean |
false |
| spa | boolean or string |
"auto" |
| honorDNT | boolean |
false |
| autoTrack | boolean |
false |
| ignoreCanonical | boolean |
false |
For an explanation of these settings, see fathom's documentation.