Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to specify browserify config in package.json (other than transform)?

In package.json we can specify browserify transforms like this:

"browserify": {
  "transform": ["babelify"]
}

Is it possible to set other config like debug, detectGlobals, input source file, output file, etc. For example, something like:

"browserify": {
  "debug": true,
  "detectGlobals": false,

  "transform": ["babelify"]
}

Thanks

like image 206
Baz Avatar asked Nov 24 '16 00:11

Baz


1 Answers

In case you haven't found an answer to this yet:

Yes, it is and quite simple. You were very close. here's the example from the browserify README.md

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

read more here.

like image 169
skipZero Avatar answered Sep 17 '22 11:09

skipZero