H
H
hbrmdc2015-06-27 20:47:36
JavaScript
hbrmdc, 2015-06-27 20:47:36

How to speed up Browserify?

I use gulp-browserify and gulp-webserver with gulp-livereload.
Every time js files are changed, dist/main.js is compiled.
It takes seconds, but the more code, the longer it takes.
Surely, it is possible not to compile dist, but to view the project in the browser directly from src files. Or somehow get rid of these seconds of waiting?
ps. no tag found for browserify on toaster. Is there an analogue?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sergey, 2015-06-27
Protko @Fesor

Switch to es6 modules and babel.js. during development, you can only rebuild the changed file and load everything through the es6-module-loader (+ compile everything into one bundle for production).

C
ChickenGrinder, 2015-10-17
@ChickenGrinder

gulp-browserify is blacklisted and is not recommended. Use the normal browserify + vinyl-source module.
Acceleration options:
1. Universal solution - Incremental builds, recipe depends on build type 1:1 or M:1
2. Use browserify middleware for webserver.
3. It is possible to optimize browserify by disabling parsing of external libraries (such as jQuery), node environments (constants like __filename, etc.)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question