Skip to content

variable name __DEV__ conflict with apollo graphql #3151

@intellild

Description

@intellild

Vuestic-ui version: 1.6.2

Steps to reproduce
build broken if used togather with nuxtjs/apollo

What is the expected behavior?

What is the current behavior?
[commonjs--resolver] Unexpected keyword 'false' in
https://github.com/epicmaxco/vuestic-ui/blob/develop/packages/ui/src/composables/useColors.ts

5: import { u as useReactiveComputed } from "./useReactiveComputed.js";
6: import { a as getBoxShadowColor, f as getBoxShadowColorFromBg, c as getHoverColor, b as getFocusColor, g as getGradie...
7: import { _ as __DEV__ } from "../utils/env.js";
                   ^
8: const useColorProps = {
9:   color: {

Other information
apollo graphql depends on a predefined global variable __DEV__
nuxtjs/apollo use vite define feature to replace the variable with false in production build

My workaround is replace all __DEV__ with __DEV__VUESTIC using pnpm patch

Metadata

Metadata

Labels

BUGSomething isn't workingd1: super easyTask for newbies. Players take half normal damage from monsters and the environment.externalReported by external contributor and handled with priorityv3: wish to haveThis is something user want, but can live without it

Type

No type

Projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions