-
Notifications
You must be signed in to change notification settings - Fork 54
Description
Describe the bug
Currently when using the webworker runtime (from @aws/language-server-runtimes/runtimes/webworker) in the browser, consumers are required to provide the path node module, because the initializeUtils file depends on it. path is only available in NodeJS environments, in browsers, there is a polyfill path-browserify but it's been unmaintained for years.
Please remove the dependency on path for webworker runtimes - this was a regression as the same issue happened before but was later fixed.
This appears to be the problematic commit: fa9892e
Please also consider adding integration tests for browser environments to prevent non-browser modules being introduced accidentally.
To reproduce
- Start a web project
- Use the webworker runtime
- bundle the runtime for web (using a tool like webpack 5+)
- see dependency errors as
pathdoes not exist.
Expected behavior
The webworker module should work without using any NodeJS-only dependencies.
Your Environment
- OS: Amazon Linux 2023
Additional context
N/A