easy-team/easywebpack

global enviroment is undefined

Penggggg opened this issue · 3 comments

What happened

These global enviroment is undefined

  • EASY_ENV_IS_DEV
  • EASY_ENV_IS_TEST
  • EASY_ENV_IS_PROD
// .vue
console.log( EASY_ENV_IS_DEV ) // undefined

version

  • egg 2.3.0
  • egg-cors 2.0.0
  • egg-webpack 3.3.2
  • egg-webpack-vue 2.0.1

下列全局变量为undefined

  • EASY_ENV_IS_DEV
  • EASY_ENV_IS_TEST
  • EASY_ENV_IS_PROD

@Penggggg 你这个进行了 easywebpack 构建没?

@hubcarl 进行了,开发环境里面,npm run tsc,然后 npm run dev

@Penggggg 这些变量是给 webpack 用的,不是 process.env 的意思,具体见 https://www.yuque.com/easy-team/easywebpack/var