Use fully specified file path for process module provider
Created by: fkling
Using only process/browser
doesn't work if a JavaScript module
references process
. At the moment, webpack will throw the following error:
[web-standalone-http] looking for modules in /home/fkling/work/sourcegraph/code/sourcegraph/node_modules
[web-standalone-http] existing directory /home/fkling/work/sourcegraph/code/sourcegraph/node_modules/process
[web-standalone-http] using description file: /home/fkling/work/sourcegraph/code/sourcegraph/node_modules/process/package.json (relative path: .)
[web-standalone-http] using description file: /home/fkling/work/sourcegraph/code/sourcegraph/node_modules/process/package.json (relative path: ./browser)
[web-standalone-http] Field 'browser' doesn't contain a valid alias configuration
[web-standalone-http] /home/fkling/work/sourcegraph/code/sourcegraph/node_modules/process/browser doesn't exist
Using the full file path fixes this.
Test plan
No webpack errors when building https://github.com/sourcegraph/sourcegraph/pull/32919 . One of the @codemirror
dependencies is a module and accesses process
.