mirror of
https://github.com/facebook/docusaurus.git
synced 2025-07-27 21:48:41 +02:00
feat(plugin-vercel-analytics): add new vercel analytics plugin (#9687)
Co-authored-by: sebastien <lorber.sebastien@gmail.com>
This commit is contained in:
parent
70ba9d2d01
commit
77723a1121
13 changed files with 394 additions and 2 deletions
17
packages/docusaurus-plugin-vercel-analytics/src/analytics.ts
Normal file
17
packages/docusaurus-plugin-vercel-analytics/src/analytics.ts
Normal file
|
@ -0,0 +1,17 @@
|
|||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
import {inject} from '@vercel/analytics';
|
||||
import globalData from '@generated/globalData';
|
||||
import type {PluginOptions} from './options';
|
||||
|
||||
const {debug, mode} = globalData['docusaurus-plugin-vercel-analytics']
|
||||
?.default as PluginOptions;
|
||||
|
||||
inject({
|
||||
mode,
|
||||
debug,
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue