import babel from 'rollup-plugin-babel'
import uglify from 'rollup-plugin-uglify'
import replace from 'rollup-plugin-replace'
import commonjs from 'rollup-plugin-commonjs'
import resolve from 'rollup-plugin-node-resolve'

const config = {
  input: 'src/index.js',
  name: 'react-move',
  globals: {
    react: 'React'
  },
  external: [
    'react'
  ],
  plugins: [
    babel({
      exclude: 'node_modules/**'
    }),
    resolve(),
    commonjs({
      include: /node_modules/
    }),
    replace({
      'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV)
    })
  ]
}

if (process.env.NODE_ENV === 'production') {
  config.plugins.push(uglify())
}

export default config

@@ -1,12 +1,27 @@
+// @flow weak%0A%0A
 import babel
@@ -47,16 +47,17 @@
 n-babel'
+;
 %0Aimport 
@@ -90,16 +90,17 @@
 -uglify'
+;
 %0Aimport 
@@ -135,16 +135,17 @@
 replace'
+;
 %0Aimport 
@@ -182,16 +182,17 @@
 ommonjs'
+;
 %0Aimport 
@@ -232,16 +232,17 @@
 resolve'
+;
 %0A%0Aconst 
@@ -330,16 +330,17 @@
  'React'
+,
 %0A  %7D,%0A  
@@ -362,16 +362,17 @@
  'react'
+,
 %0A  %5D,%0A  
@@ -426,16 +426,17 @@
 ules/**'
+,
 %0A    %7D),
@@ -495,16 +495,17 @@
 modules/
+,
 %0A    %7D),
@@ -589,21 +589,25 @@
 ENV)
+,
 %0A    %7D)
+,
 %0A  %5D
+,
 %0A%7D
+;
 %0A%0Aif
@@ -680,16 +680,17 @@
 glify())
+;
 %0A%7D%0A%0Aexpo
@@ -706,9 +706,10 @@
 t config
+;
 %0A

fix linting