File tree Expand file tree Collapse file tree 3 files changed +12
-1
lines changed Expand file tree Collapse file tree 3 files changed +12
-1
lines changed Original file line number Diff line number Diff line change
1
+ . refine (
2
+ ( data ) => {
3
+ if ( data . NODE_ENV === 'production' ) return Boolean ( data . PLAUSIBLE_SCRIPT_URL ) ;
4
+ return true ;
5
+ } ,
6
+ {
7
+ message : 'PLAUSIBLE_SCRIPT_URL is required in production' ,
8
+ path : [ 'PLAUSIBLE_SCRIPT_URL' ] ,
9
+ }
10
+ ) ;
Original file line number Diff line number Diff line change @@ -530,5 +530,6 @@ folder name for slug and index.mdx and images
530
530
// plausible
531
531
<script defer data -domain = " nemanjamitic.com" src = " https://plausible.arm1.nemanjamitic.com/js/script.js" ></script >
532
532
add zod schema that checks node_env for plausible_url instead of optional
533
+ moze samo za 1 url data-domain="nemanjamitic.com"
533
534
------------
534
535
```
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ export const processEnvSchema = z.object({
18
18
} ) ;
19
19
20
20
export const configServerSchema = processEnvSchema
21
- . omit ( { SITE_URL : true , PREVIEW_MODE : true } )
21
+ . omit ( { SITE_URL : true , PREVIEW_MODE : true , PLAUSIBLE_SCRIPT_URL : true } )
22
22
. extend ( { PREVIEW_MODE : z . boolean ( ) } ) ; // here its boolean, not 'true' | 'false'
23
23
24
24
export const configClientSchema = processEnvSchema
You can’t perform that action at this time.
0 commit comments