File tree 3 files changed +9
-4
lines changed
3 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -32,8 +32,10 @@ export const MotionPlugin = {
32
32
const variants = options . directives [ key ] as MotionVariants < any >
33
33
34
34
// 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
+ )
37
39
}
38
40
39
41
// Register the custom `v-motion-${key}` directive
Original file line number Diff line number Diff line change @@ -122,7 +122,7 @@ export function setupMotionComponent(
122
122
[ key : number ] : MotionInstance < string , MotionVariants < string > >
123
123
} > ( { } )
124
124
125
- const customPresets = inject < Record < string , Variant > > ( CUSTOM_PRESETS )
125
+ const customPresets = inject < Record < string , Variant > > ( CUSTOM_PRESETS , { } )
126
126
127
127
// Preset variant or empty object if none is provided
128
128
const preset = computed ( ( ) => {
@@ -195,7 +195,7 @@ export function setupMotionComponent(
195
195
} )
196
196
197
197
// Replay animations on component update Vue
198
- if ( import . meta. env . DEV ) {
198
+ if ( import . meta. dev ) {
199
199
// Validate passed preset
200
200
if (
201
201
props . preset != null
Original file line number Diff line number Diff line change @@ -3,6 +3,9 @@ import { defineConfig } from 'vite'
3
3
4
4
export default defineConfig ( {
5
5
root : __dirname ,
6
+ define : {
7
+ dev : JSON . stringify ( false ) ,
8
+ } ,
6
9
test : {
7
10
environment : 'happy-dom' ,
8
11
include : [ './tests/**/*.spec.ts' ] ,
You can’t perform that action at this time.
0 commit comments