Skip to content

Commit 4dfe495

Browse files
author
strausr
committed
feat(analytics): add CLI feature detection for React SDK
1 parent ac51e42 commit 4dfe495

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

templates/vite.config.ts.template

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,9 @@ import react from '@vitejs/plugin-react'
44
// https://vite.dev/config/
55
export default defineConfig({
66
plugins: [react()],
7+
define: {
8+
// Analytics: Mark this project as created via create-cloudinary-react CLI
9+
'process.env.CLOUDINARY_SOURCE': '"cli"',
10+
'process.env.CLD_CLI': '"true"',
11+
},
712
})

0 commit comments

Comments
 (0)