Skip to content

Commit

Permalink
enable export-all. known negative side-effect tracked in #2
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrei Neculau (anu) committed Mar 23, 2018
1 parent 7f8daa0 commit 549d0df
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 21 deletions.
18 changes: 3 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Included presets/plugins can be

## Firecloud plugins

### `babel-plugin-firecloud-export-all` (default: disabled)
### `babel-plugin-firecloud-export-all` (default: enabled)

Makes all top-level module definitions exported (adding `export` keyword to declaration).

Expand Down Expand Up @@ -79,22 +79,10 @@ export let foo = function() {

**NOTE** A negative side-effect. While debugging, Chrome won't be able to get the value of an exported variable,
because the source map will reference `exports.something`, while you still hover `something`.
Tracked in https://github.com/tobiipro/babel-preset-firecloud/issues/2 .

To enable in `.babelrc.js`:

```js
module.exports = {
presets: [
['firecloud', {
'babel-plugin-firecloud-export-all': {
disabled: false
}
}]
]
};
```

### `babel-plugin-firecloud-src-arg` (disabled by default)
### `babel-plugin-firecloud-src-arg` (default: disabled)

Adds an extra argument with info about location (file/line/column) to calls of a function e.g. logger.

Expand Down
6 changes: 0 additions & 6 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,6 @@ module.exports = function(context, options) {
useBuiltIns: options.useBuiltIns
},

/* Disabling by-default, because can unexpectedly change how Chrome debugger works.
It will be looking for a variable "exports.foo", while you point at "foo" and fail. */
'babel-plugin-firecloud-export-all': {
disabled: true
},

'babel-plugin-firecloud-src-arg': {
disabled: true
}
Expand Down

0 comments on commit 549d0df

Please sign in to comment.