babel-preset-insilico-react-app
Advanced tools
Comparing version
37
index.js
@@ -79,3 +79,2 @@ 'use strict'; | ||
var config; | ||
require.resolve('babel-preset-latest'); | ||
@@ -98,6 +97,31 @@ if (env === 'test') { | ||
} else { | ||
if (env === 'production') { | ||
plugins.push.apply(plugins, [ | ||
// Remove PropTypes in Production | ||
require.resolve('babel-plugin-transform-react-remove-prop-types'), | ||
// Convert pure classes to functions | ||
require.resolve('babel-plugin-transform-react-pure-class-to-function'), | ||
]); | ||
} | ||
config = { | ||
presets: [ | ||
// Latest stable ECMAScript features | ||
['latest', opts], | ||
[ | ||
require.resolve('babel-preset-env'), | ||
{ | ||
targets: { | ||
// React parses on ie 9, so we should too | ||
ie: 9, | ||
// We currently minify with uglify | ||
// Remove after https://github.com/mishoo/UglifyJS2/issues/448 | ||
uglify: true, | ||
}, | ||
// Disable polyfill transforms | ||
useBuiltIns: false, | ||
// Do not transform modules to CJS | ||
modules: false, | ||
}, | ||
opts | ||
], | ||
// JSX, Flow | ||
@@ -114,11 +138,2 @@ require.resolve('babel-preset-react') | ||
}; | ||
if (env === 'production') { | ||
plugins.push.apply(plugins, [ | ||
// Remove PropTypes in Production | ||
require.resolve('babel-plugin-transform-react-remove-prop-types'), | ||
// Convert pure classes to functions | ||
require.resolve('babel-plugin-transform-react-pure-class-to-function'), | ||
]); | ||
} | ||
} | ||
@@ -125,0 +140,0 @@ |
{ | ||
"name": "babel-preset-insilico-react-app", | ||
"version": "1.0.26", | ||
"version": "1.1.0", | ||
"description": "Babel preset used by Insilico", | ||
@@ -25,6 +25,6 @@ "repository": "https://github.com/InSilicoCPH/babel-preset-insilico-react-app", | ||
"dependencies": { | ||
"babel-plugin-dynamic-import-node": "1.0.0", | ||
"babel-plugin-dynamic-import-node": "1.0.1", | ||
"babel-plugin-dynamic-import-webpack": "1.0.1", | ||
"babel-plugin-lodash": "3.2.11", | ||
"babel-plugin-module-resolver": "^2.5.0", | ||
"babel-plugin-module-resolver": "^2.7.0", | ||
"babel-plugin-system-import-transformer": "3.1.0", | ||
@@ -42,4 +42,3 @@ "babel-plugin-transform-class-properties": "^6.23.0", | ||
"babel-plugin-transform-runtime": "^6.23.0", | ||
"babel-preset-env": "^1.1.10", | ||
"babel-preset-latest": "^6.22.0", | ||
"babel-preset-env": "^1.3.2", | ||
"babel-preset-react": "^6.23.0", | ||
@@ -46,0 +45,0 @@ "babel-runtime": "^6.23.0" |
7013
6.35%19
-5%129
13.16%+ Added
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
Updated