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

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

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/[email protected]/dist/vuex.esm-browser.js

Steps to reproduce

Compare build from 3.3.0

https://unpkg.com/[email protected]/dist/vuex.esm.browser.js

to build for 4.0.0-beta.1

https://unpkg.com/[email protected]/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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4.x bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants