-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add browser entry to package.json, see #995
- Loading branch information
Showing
1 changed file
with
2 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "protobufjs", | ||
"version": "6.8.6", | ||
"version": "6.8.7", | ||
"versionScheme": "~", | ||
"description": "Protocol Buffers for JavaScript (& TypeScript).", | ||
"author": "Daniel Wirtz <[email protected]>", | ||
|
@@ -18,6 +18,7 @@ | |
"typescript" | ||
], | ||
"main": "index.js", | ||
"browser": "dist/protobuf.js", | ||
"types": "index.d.ts", | ||
"bin": { | ||
"pbjs": "bin/pbjs", | ||
|
7c391d6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding the line
"browser": "dist/protobuf.js",
causes issues when we use browserify to create our own bundle that has protobufjs as a dependency.
Example error:
Error: Cannot find module '5' from 'C:\Users\rydorson\AugmentationLoop\node_modules\protobufjs\dist' at C:\Users\rydorson\AugmentationLoop\node_modules\browser-resolve\node_modules\resolve\lib\async.js:46:17 at process (C:\Users\rydorson\AugmentationLoop\node_modules\browser-resolve\node_modules\resolve\lib\async.js:173:43) at ondir (C:\Users\rydorson\AugmentationLoop\node_modules\browser-resolve\node_modules\resolve\lib\async.js:188:17) at load (C:\Users\rydorson\AugmentationLoop\node_modules\browser-resolve\node_modules\resolve\lib\async.js:69:43) at onex (C:\Users\rydorson\AugmentationLoop\node_modules\browser-resolve\node_modules\resolve\lib\async.js:92:31) at C:\Users\rydorson\AugmentationLoop\node_modules\browser-resolve\node_modules\resolve\lib\async.js:22:47