Skip to content

Commit 7939a4b

Browse files
committed
Updated README and bundler according to dynamic require calls
1 parent 8ef6975 commit 7939a4b

File tree

8 files changed

+7
-10
lines changed

8 files changed

+7
-10
lines changed

README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -436,11 +436,9 @@ $> npm run types
436436

437437
### Browserify integration
438438

439-
protobuf.js integrates into any browserify build-process. There are a few possible tweaks:
439+
By default, protobuf.js integrates into your browserify build-process without requiring any optional modules. Hence:
440440

441-
* If performance is a concern or IE8 support is required, you should make sure to exclude the browserified `buffer` module and let protobuf.js do its thing with Uint8Array/Array instead.
442-
* If you do not need int64 support, you can explicitly exclude the `long` module. It will be included otherwise.
443-
* If your application does not rely on the following modules and package size is a concern, you can also exclude `process` , `_process` and `fs`.
441+
* If you need int64 support, explicitly require the `long` module somewhere in your project. It will be excluded otherwise.
444442
* If you have any special requirements, there is [the bundler](https://github.com/dcodeIO/protobuf.js/blob/master/scripts/bundle.js) as a reference.
445443

446444
Performance

dist/protobuf.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/protobuf.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/protobuf.min.js.gz

1 Byte
Binary file not shown.

dist/runtime/protobuf.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/runtime/protobuf.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/runtime/protobuf.min.js.gz

0 Bytes
Binary file not shown.

scripts/bundle.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,7 @@ function bundle(compress, runtime) {
4040
.external("long")
4141
.external("buffer")
4242
.exclude("process")
43-
.exclude("_process") // what is it...
44-
.exclude("fs")
43+
.exclude("_process")
4544
.plugin(require('bundle-collapser/plugin'))
4645
.bundle()
4746
.pipe(source(compress ? 'protobuf.min.js' : 'protobuf.js'))

0 commit comments

Comments
 (0)