Skip to content

Instantly share code, notes, and snippets.

@crobinson42
Created March 30, 2018 02:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save crobinson42/3266ea3a419a8c861094520114e925a7 to your computer and use it in GitHub Desktop.
Save crobinson42/3266ea3a419a8c861094520114e925a7 to your computer and use it in GitHub Desktop.
rollup-plugin-commonjs issue with default no exported
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