Created
March 30, 2018 02:03
-
-
Save crobinson42/3266ea3a419a8c861094520114e925a7 to your computer and use it in GitHub Desktop.
rollup-plugin-commonjs issue with default no exported
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import babel from 'rollup-plugin-babel'; | |
import commonjs from 'rollup-plugin-commonjs'; | |
import resolve from 'rollup-plugin-node-resolve'; | |
export default { | |
input: 'src/index.js', | |
output: [ | |
{ | |
file: 'lib/bundle.es.js', | |
format: 'es', | |
}, | |
{ | |
file: 'lib/bundle.cjs.js', | |
format: 'cjs', | |
}, | |
], | |
plugins: [ | |
resolve({ | |
extensions: ['.jsx', '.js'], | |
customResolveOptions: { | |
moduleDirectory: ['node_modules', 'src'], | |
}, | |
modulesOnly: false, | |
preferBuiltins: false, | |
}), | |
babel({ | |
babelrc: false, | |
presets: [ | |
'react', | |
[ | |
'env', | |
{ | |
modules: false, | |
}, | |
], | |
], | |
}), | |
commonjs({}), | |
], | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment