Skip to content

Commit ffbd13a

Browse files
committed
fix: do not render script warning in production
1 parent fd59b17 commit ffbd13a

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed
Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
11
<template>
2-
<div>
3-
Rendering the <ProseCode>script</ProseCode> element is dangerous and is disabled by default. Consider implementing your own <ProseCode>ProseScript</ProseCode> element to have control over script rendering.
2+
<div v-if="isDev">
3+
Rendering the <code>script</code> element is dangerous and is disabled by default. Consider implementing your own <code>ProseScript</code> element to have control over script rendering.
44
</div>
55
</template>
66

77
<script setup lang="ts">
8+
import { computed } from 'vue'
9+
810
defineProps({
911
src: {
1012
type: String,
1113
default: ''
1214
}
1315
})
16+
const isDev = computed(() => process.dev)
1417
</script>

0 commit comments

Comments
 (0)