Skip to content

ESM browser build still contains references to process.env #1730

New issue

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

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

Already on GitHub? # to your account

Closed
pearofducks opened this issue Apr 25, 2020 · 3 comments
Closed

ESM browser build still contains references to process.env #1730

pearofducks opened this issue Apr 25, 2020 · 3 comments
Assignees
Labels
4.x bug Something isn't working

Comments

@pearofducks
Copy link
Contributor

Version

4.0.0-beta.1

Reproduction link

https://unpkg.com/vuex@4.0.0-beta.1/dist/vuex.esm-browser.js

Steps to reproduce

Compare build from 3.3.0

https://unpkg.com/vuex@3.3.0/dist/vuex.esm.browser.js

to build for 4.0.0-beta.1

https://unpkg.com/vuex@4.0.0-beta.1/dist/vuex.esm-browser.js

What is expected?

No references to process.env

What is actually happening?

References to process.env which cause it to not be usable in the browser.


Original issue creating these builds - #1247

Resolving this is blocking Vuex use in Vite

@pearofducks pearofducks changed the title ESM browser build still contains references to process ESM browser build still contains references to process.env Apr 25, 2020
@kiaking kiaking added 4.x bug Something isn't working labels Apr 26, 2020
@kiaking
Copy link
Member

kiaking commented Apr 26, 2020

Thank you so much for the report! I'll create a fix.

@kiaking kiaking self-assigned this Apr 26, 2020
@kiaking
Copy link
Member

kiaking commented Apr 26, 2020

OK seems like this happened when we forward port Vuex 3 to Vuex 4, where Vuex 3 uses process.env instead of __DEV__. We should just make Vuex 3 use __DEV__ and then merge back in to Vuex 4.

I'll include the fix in #1729.

@kiaking
Copy link
Member

kiaking commented Jun 26, 2020

OK this is actually fixed at #1729. Forgot to close it.

@kiaking kiaking closed this as completed Jun 26, 2020
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
4.x bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants