Skip to content

Commit

Permalink
Use babel-plugin-dev-expression
Browse files Browse the repository at this point in the history
This will automatically do the right thing with our __DEV__ statements
that we use to prune out development-only code from our production
builds.

Helps #111
Fixes #112
  • Loading branch information
mjackson committed Dec 12, 2018
1 parent 8f3a0fd commit 81ea517
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 13 deletions.
24 changes: 12 additions & 12 deletions .size-snapshot.json
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
{
"esm/react-media.js": {
"bundled": 3856,
"minified": 2318,
"gzipped": 885,
"bundled": 3965,
"minified": 2402,
"gzipped": 918,
"treeshaked": {
"rollup": {
"code": 1928,
"import_statements": 272
"code": 1653,
"import_statements": 265
},
"webpack": {
"code": 3186
"code": 2885
}
}
},
"umd/react-media.js": {
"bundled": 34826,
"minified": 10989,
"gzipped": 3946
"bundled": 34833,
"minified": 10982,
"gzipped": 3944
},
"umd/react-media.min.js": {
"bundled": 11533,
"minified": 4294,
"gzipped": 1936
"bundled": 11106,
"minified": 4014,
"gzipped": 1837
}
}
3 changes: 2 additions & 1 deletion modules/.babelrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"presets": [["@babel/env", { "loose": true }], "@babel/react"],
"plugins": [
"@babel/proposal-class-properties",
"@babel/proposal-export-default-from"
"@babel/proposal-export-default-from",
"dev-expression"
]
}

0 comments on commit 81ea517

Please sign in to comment.