-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
Description
Version
2.9.3
Reproduction link
https://github.com/DonHartman/vue-bug
Steps to reproduce
Clone the linked repo. (or Create a .env file for a new vue project in accordance with https://github.com/vuejs/vue-cli/blob/dev/docs/env.md, and give VUE_APP_TEST a value, then use it in code.)
Serve the project with "npm run serve" (I used powershell, if it makes a difference).
View the served app in a browser with dev tools open, I've included a "debugger;" line above the issue.
What is expected?
According to https://github.com/vuejs/vue-cli/blob/dev/docs/env.md , process.env.VUE_APP_TEST should have the "sample" value .
What is actually happening?
The code that accesses "process" throws the error "process is not defined".
The github repo linked has the fully initialized project (the first commit is auto-generated by vue-cli, the second is my minimal changes to recreate the issue). It can likely be reproduced with much less code, but I wanted to emphasize that it is a problem out-of-the-box with vue-cli, so I only made minimal changes to the pre-made project instead of a minimal project.
These are the settings I used to create it:
Run "vue create "
Choose manual settings
Typescript, Router, Vuex, Linkter / Formatter
yes, class style components
yes, babel polyfills
TSLint
Lint on save
In dedicated config files