Skip to content

Commit

Permalink
fix: fix dev errors when using transform-react-inline-elements
Browse files Browse the repository at this point in the history
The babel-plugin-transform-react-inline-elements plugin was giving some weird errors (false positions).
The reason was that a dependency was being inlined and included in an app running development mode.

This can be re-enabled when we no longer generate a built version of libs, see #26.
  • Loading branch information
satazor committed Sep 10, 2018
1 parent 109ad98 commit 722526c
Show file tree
Hide file tree
Showing 4 changed files with 5,018 additions and 4,528 deletions.
5 changes: 2 additions & 3 deletions index.js
Expand Up @@ -11,16 +11,15 @@ function addReactSupport(config, options) {
// Enable optimizations on production
if (options.env === 'production') {
config.plugins.push(
require.resolve('babel-plugin-transform-react-remove-prop-types'),
require.resolve('babel-plugin-transform-react-inline-elements')
require.resolve('babel-plugin-transform-react-remove-prop-types')
);
// The following two plugins are currently necessary to make React warnings include more valuable information.
// They are included here because they are currently not enabled in babel-preset-react.
// See the below threads for more info:
// https://github.com/babel/babel/issues/4702
// https://github.com/babel/babel/pull/3540#issuecomment-228673661
// https://github.com/facebookincubator/create-react-app/issues/989
} else {
} else if (options.env === 'development') {
config.plugins.push(
// Adds component stack to warning messages
require.resolve('babel-plugin-transform-react-jsx-source'),
Expand Down

0 comments on commit 722526c

Please sign in to comment.