babel-react-optimize icon indicating copy to clipboard operation
babel-react-optimize copied to clipboard

Put constant-elements plugin last

Open slorber opened this issue 8 years ago • 4 comments

see https://github.com/babel/babel/issues/5325#issuecomment-292064058

There's a bug some of us have with this plugin, and it seems to disappear (or at least on some codebases) when this plugin is declared last in the list.

slorber avatar Apr 06 '17 09:04 slorber

Can replicate.

The error:

ERROR in ./app/components/MovieTile/index.js
Module parse failed: /Users/gajus/Documents/dev/applaudience/applaudience-com/node_modules/babel-loader/lib/index.js??ref--0!/Users/gajus/Documents/dev/applaudience/applaudience-com/dist/app/components/MovieTile/index.js Unexpected token (32:26)
You may need an appropriate loader to handle this file type.
| }, void 0, _jsx('b', {}, void 0, 'Change location'), _jsx('br', {}), 'to see other venues playing the movie.'));
|
| export default (function ((_temp = _ref, _ref6 = <MovieDetailsCard movie={movie} />, _temp)) {
|   var _temp, _ref6;
|
 @ ./app/index.js 1:0-47
 @ multi ./app

Example code thats causing this https://gist.github.com/gajus/1b851a3d753114ea856c85b742db9546

gajus avatar May 29 '17 15:05 gajus

I found this error too

LoicMahieu avatar Jan 11 '18 10:01 LoicMahieu

We had this issue too.

ljbade avatar Jan 15 '18 00:01 ljbade

Same deal here. Any chance this can get merged in and a new version released?

AndersDJohnson avatar Feb 28 '18 21:02 AndersDJohnson