How to run browserify without ecmascript-6 transpilation?

152 Views Asked by At

Recently I stumbled upon a library for nodejs, that I want to use in a frontend project. Because the whole project is developed in ES6, the library should not be transpiled (we only develop for browsers, supporting es6). Of course, I could "browserify" manually, but because it can be a reoccurring task, I would like to use browserify without babelify or any es6 transpilation process. If transpilation is needed later on, I'd integrate it into the whole build process, but not beforehand.

Is there any option to browserify to omit es6 to ecmascript-5.1 transpilation?

1

There are 1 best solutions below

0
On

By default, browserify does not do any transpilation process, if no plugins are enabled. It turned out, that the library I wanted browserify, passed some options to browserify in its package.json:

"browserify": {
    "transform": [ [ "babelify", { "presets": "es2015" } ] ]
}

this caused browserify to use the babelify plugin by default.