Permalink
Browse files

Updated README and bundler according to dynamic require calls

  • Loading branch information...
dcodeIO committed Dec 18, 2016
1 parent 8ef6975 commit 7939a4bd8baca5f7e07530fc93f27911a6d91c6f
@@ -436,11 +436,9 @@ $> npm run types
### Browserify integration
protobuf.js integrates into any browserify build-process. There are a few possible tweaks:
By default, protobuf.js integrates into your browserify build-process without requiring any optional modules. Hence:
* 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.
* If you do not need int64 support, you can explicitly exclude the `long` module. It will be included otherwise.
* If your application does not rely on the following modules and package size is a concern, you can also exclude `process` , `_process` and `fs`.
* If you need int64 support, explicitly require the `long` module somewhere in your project. It will be excluded otherwise.
* If you have any special requirements, there is [the bundler](https://github.com/dcodeIO/protobuf.js/blob/master/scripts/bundle.js) as a reference.
Performance

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
BIN +1 Byte (100%) dist/protobuf.min.js.gz
Binary file not shown.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
BIN +0 Bytes (100%) dist/runtime/protobuf.min.js.gz
Binary file not shown.
@@ -40,8 +40,7 @@ function bundle(compress, runtime) {
.external("long")
.external("buffer")
.exclude("process")
.exclude("_process") // what is it...
.exclude("fs")
.exclude("_process")
.plugin(require('bundle-collapser/plugin'))
.bundle()
.pipe(source(compress ? 'protobuf.min.js' : 'protobuf.js'))

0 comments on commit 7939a4b

Please sign in to comment.