2nthony / dvan

🛠️Yet another config-free JavaScript bundler
https://dvan.js.org
MIT License
6 stars 0 forks source link

Add global constants to distinguish current ENV #19

Open 2nthony opened 5 years ago

2nthony commented 5 years ago

Now idea is check package.json

If have vue then set __DVAN_ENV__ = 'vue', cannot set VUE_ENV because vue-ssr using it(If I still remember).

If have React then set __DVAN_ENV__ = 'react'


Maybe this way is better: If have vue then set __DVAN_ENV__ to vue, react in otherwise.

2nthony commented 5 years ago

Actually use __DVAN_ENV__: string in Client-Side, also have __IS_VUE__: boolean

Since version: 2.1.5