browserify / browserify/browserify-handbook

Document (or change) nested arrays for package.json transform field?

Open
#65 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
4.6k
Forks
290
PR merge metrics
No merged PRs in 30d

Description

From https://github.com/babel/babelify/issues/142, it seems the syntax where individual transforms are specified as arrays is correct.

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

The syntax for this part:

```
[
"babelify",
{
"presets": ["es2015"]
}
]
```

is odd: the array doesn't seem to be used as an ordered list of items. `"babelify"` is item 0, `{"presets": ["es2015"]}` is item 1. What would item 2 be?

If there wouldn't ever be an item 2, and this is simply a map between `babelify` and babelify's options, wouldn't an object be more logical?

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

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.