Skip to content

Commit c83fc77

Browse files
committed
fix: use import.meta.env.MODE to check environment
1 parent ad27084 commit c83fc77

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/plugin/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ 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 && import.meta.env.DEV) {
35+
if (!variants.initial && import.meta.env.MODE === 'development') {
3636
console.warn(
3737
`Your directive v-motion-${key} is missing initial variant!`,
3838
)

src/utils/component.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -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.env.MODE === 'development') {
199199
// Validate passed preset
200200
if (
201201
props.preset != null

src/utils/keys.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
export const CUSTOM_PRESETS = Symbol(
2-
import.meta.env.DEV ? 'motionCustomPresets' : '',
2+
import.meta.env.MODE === 'development' ? 'motionCustomPresets' : '',
33
)

0 commit comments

Comments
 (0)