Version
3.0.0
Reproduction link
https://github.com/ffxsam/repro-undefined-import
Node and OS info
yarn 1.9.4, Ubuntu 18.04
Steps to reproduce
- Clone and run
yarn
yarn serve
- Open Chrome console, note that
routes
is undefined
What is expected?
routes
should be an array of routes
What is actually happening?
routes
is undefined
Of note is this line in the code:
https://github.com/ffxsam/repro-undefined-import/blob/master/src/components/LoginForm.vue#L100
Edit that and replace routeNames.DASHBOARD
with any arbitrary string, and save. Now you'll see that routes
in the console is an array. Also updating the import to the following will fix it:
import { routeNames } from '../router/route-names';
This is very strange and took me hours to track down. It may or may not be a vue-cli issue, but I figured this was a good starting point. Sorry I don't have a more descriptive issue report, but it's so random, I'm not even sure how to describe it.