Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

process.env.NODE_ENV causing problems in @vue/vite #1737

Closed
ais-one opened this issue Apr 29, 2020 · 1 comment
Closed

process.env.NODE_ENV causing problems in @vue/vite #1737

ais-one opened this issue Apr 29, 2020 · 1 comment

Comments

@ais-one
Copy link

ais-one commented Apr 29, 2020

Version

4.0.0-beta.1

Reproduction link

https://github.com/ais-one/vite-eg

Steps to reproduce

clone the reproduction repo
follow README.md to install and run
view browser console.log for error

The problem in vite (which does not use webpack, does not have process)

class Store {
  constructor (options = {}) {
    if (process.env.NODE_ENV !== 'production') {
      assert(typeof Promise !== 'undefined', `vuex requires a Promise polyfill in this browser.`);
      assert(this instanceof Store, `store must be called with the new operator.`);
    }

What is expected?

Vuex createStore runs without error

What is actually happening?

Vuex createStore runs has error when running without webpack


It may have the same problem on ESM build

@ais-one
Copy link
Author

ais-one commented Apr 29, 2020

sorry closing this. It is being dealt with in #1730

@ais-one ais-one closed this as completed Apr 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant