separate .babelrc for prod/dev, add babel-plugin-lodash (#2829)
This commit is contained in:
		
				
					committed by
					
						
						Eugen Rochko
					
				
			
			
				
	
			
			
			
						parent
						
							cf0b753209
						
					
				
				
					commit
					37caf0b36e
				
			
							
								
								
									
										17
									
								
								.babelrc
									
									
									
									
									
								
							
							
						
						
									
										17
									
								
								.babelrc
									
									
									
									
									
								
							@@ -11,8 +11,6 @@
 | 
				
			|||||||
    ]
 | 
					    ]
 | 
				
			||||||
  ],
 | 
					  ],
 | 
				
			||||||
  "plugins": [
 | 
					  "plugins": [
 | 
				
			||||||
    "transform-react-jsx-source",
 | 
					 | 
				
			||||||
    "transform-react-jsx-self",
 | 
					 | 
				
			||||||
    "transform-decorators-legacy",
 | 
					    "transform-decorators-legacy",
 | 
				
			||||||
    "transform-object-rest-spread",
 | 
					    "transform-object-rest-spread",
 | 
				
			||||||
    [
 | 
					    [
 | 
				
			||||||
@@ -21,5 +19,18 @@
 | 
				
			|||||||
        "messagesDir": "./build/messages"
 | 
					        "messagesDir": "./build/messages"
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    ]
 | 
					    ]
 | 
				
			||||||
  ]
 | 
					  ],
 | 
				
			||||||
 | 
					  "env": {
 | 
				
			||||||
 | 
					    "development": {
 | 
				
			||||||
 | 
					      "plugins": [
 | 
				
			||||||
 | 
					        "transform-react-jsx-source",
 | 
				
			||||||
 | 
					        "transform-react-jsx-self"
 | 
				
			||||||
 | 
					      ]
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    "production": {
 | 
				
			||||||
 | 
					      "plugins": [
 | 
				
			||||||
 | 
					        "lodash"
 | 
				
			||||||
 | 
					      ]
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,5 +1,8 @@
 | 
				
			|||||||
module.exports = {
 | 
					module.exports = {
 | 
				
			||||||
  test: /\.js(\.erb)?$/,
 | 
					  test: /\.js(\.erb)?$/,
 | 
				
			||||||
  exclude: /node_modules/,
 | 
					  exclude: /node_modules/,
 | 
				
			||||||
  loader: 'babel-loader'
 | 
					  loader: 'babel-loader',
 | 
				
			||||||
 | 
					  options: {
 | 
				
			||||||
 | 
					    forceEnv: process.env.NODE_ENV || 'development'
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -108,6 +108,7 @@
 | 
				
			|||||||
  "devDependencies": {
 | 
					  "devDependencies": {
 | 
				
			||||||
    "@kadira/storybook": "^2.35.3",
 | 
					    "@kadira/storybook": "^2.35.3",
 | 
				
			||||||
    "babel-eslint": "^7.2.2",
 | 
					    "babel-eslint": "^7.2.2",
 | 
				
			||||||
 | 
					    "babel-plugin-lodash": "^3.2.11",
 | 
				
			||||||
    "chai": "^3.5.0",
 | 
					    "chai": "^3.5.0",
 | 
				
			||||||
    "chai-enzyme": "^0.6.1",
 | 
					    "chai-enzyme": "^0.6.1",
 | 
				
			||||||
    "enzyme": "^2.8.2",
 | 
					    "enzyme": "^2.8.2",
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -627,6 +627,13 @@ babel-plugin-check-es2015-constants@^6.22.0, babel-plugin-check-es2015-constants
 | 
				
			|||||||
  dependencies:
 | 
					  dependencies:
 | 
				
			||||||
    babel-runtime "^6.22.0"
 | 
					    babel-runtime "^6.22.0"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					babel-plugin-lodash@^3.2.11:
 | 
				
			||||||
 | 
					  version "3.2.11"
 | 
				
			||||||
 | 
					  resolved "https://registry.yarnpkg.com/babel-plugin-lodash/-/babel-plugin-lodash-3.2.11.tgz#21c8fdec9fe1835efaa737873e3902bdd66d5701"
 | 
				
			||||||
 | 
					  dependencies:
 | 
				
			||||||
 | 
					    glob "^7.1.1"
 | 
				
			||||||
 | 
					    lodash "^4.17.2"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
babel-plugin-react-docgen@^1.4.2:
 | 
					babel-plugin-react-docgen@^1.4.2:
 | 
				
			||||||
  version "1.4.2"
 | 
					  version "1.4.2"
 | 
				
			||||||
  resolved "https://registry.yarnpkg.com/babel-plugin-react-docgen/-/babel-plugin-react-docgen-1.4.2.tgz#04c02133b84b6cc182d35de2162f15764da03e7c"
 | 
					  resolved "https://registry.yarnpkg.com/babel-plugin-react-docgen/-/babel-plugin-react-docgen-1.4.2.tgz#04c02133b84b6cc182d35de2162f15764da03e7c"
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user