-
-
Notifications
You must be signed in to change notification settings - Fork 38
Closed
Labels
🙅 no/wontfixThis is not (enough of) an issue for this projectThis is not (enough of) an issue for this project🙋 no/questionThis does not need any changesThis does not need any changes
Description
Subject of the issue
The VFile constructor references process directly. In a vanilla browser environment, this throws an error. However, many build systems polyfill process so this may have gone unnoticed in most applications -- process is mocked by default by Webpack, and Browserify does something similar.
Your environment
- OS: Mac OSX 10.14.5
- Packages:
unified@6.2.0,vfile@2.3.0(viareact-markdown@4.2.2) - Env:
node@10.16.0npm@6.9.0yarn@1.16.0- Chrome v76.0.3809.132
Steps to reproduce
In an environment without a global process object (e.g. a vanilla browser, a webpack build with the process mock disabled):
- Call
vfile(), either as a standalone function (which redirects to call as a constructor) or as a constructor (new VFile()). - or call ☝️from e.g.
processor.parseFile()
Expected behaviour
The VFile() constructor instantiates an object.
Actual behaviour
The VFile() constructor throws.
EvHaus
Metadata
Metadata
Assignees
Labels
🙅 no/wontfixThis is not (enough of) an issue for this projectThis is not (enough of) an issue for this project🙋 no/questionThis does not need any changesThis does not need any changes