Skip to content

ENV/mode loading timing problem #959

Closed
@hengwei-lhm

Description

@hengwei-lhm

Version

3.0.0-beta.5

Reproduction link

https://codepen.io/anon/pen/yKBxvQ

Steps to reproduce

1 .vue.config.js
module.exports = {
baseUrl: process.env.NODE_ENV === 'production' ? "{{.urlPrefix}}" : "debug",
}
2 .run vue-cli-service build --mode production in command line

What is expected?

run vue-cli-service build --mode production in command line ; process.env.NODE_ENV === 'production'

What is actually happening?

process.env.NODE_ENV === undefined

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions