File tree Expand file tree Collapse file tree 3 files changed +9
-4
lines changed Expand file tree Collapse file tree 3 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -32,8 +32,10 @@ export const MotionPlugin = {
3232 const variants = options . directives [ key ] as MotionVariants < any >
3333
3434 // Development warning, showing definitions missing `initial` key
35- if ( ! variants . initial && __DEV__ ) {
36- console . warn ( `Your directive v-motion-${ key } is missing initial variant!` )
35+ if ( ! variants . initial && import . meta. dev ) {
36+ console . warn (
37+ `Your directive v-motion-${ key } is missing initial variant!` ,
38+ )
3739 }
3840
3941 // Register the custom `v-motion-${key}` directive
Original file line number Diff line number Diff line change @@ -122,7 +122,7 @@ export function setupMotionComponent(
122122 [ key : number ] : MotionInstance < string , MotionVariants < string > >
123123 } > ( { } )
124124
125- const customPresets = inject < Record < string , Variant > > ( CUSTOM_PRESETS )
125+ const customPresets = inject < Record < string , Variant > > ( CUSTOM_PRESETS , { } )
126126
127127 // Preset variant or empty object if none is provided
128128 const preset = computed ( ( ) => {
@@ -195,7 +195,7 @@ export function setupMotionComponent(
195195 } )
196196
197197 // Replay animations on component update Vue
198- if ( import . meta. env . DEV ) {
198+ if ( import . meta. dev ) {
199199 // Validate passed preset
200200 if (
201201 props . preset != null
Original file line number Diff line number Diff line change @@ -3,6 +3,9 @@ import { defineConfig } from 'vite'
33
44export default defineConfig ( {
55 root : __dirname ,
6+ define : {
7+ dev : JSON . stringify ( false ) ,
8+ } ,
69 test : {
710 environment : 'happy-dom' ,
811 include : [ './tests/**/*.spec.ts' ] ,
You can’t perform that action at this time.
0 commit comments