Skip to content

Instantly share code, notes, and snippets.

@Couto
Last active July 31, 2018 15:05
Show Gist options
  • Save Couto/1075553d0a35cc61ae564ef016dde6b3 to your computer and use it in GitHub Desktop.
Save Couto/1075553d0a35cc61ae564ef016dde6b3 to your computer and use it in GitHub Desktop.
Demonstration of a bug in rollup-plugin-commonjs
export default (a, b) => a + b;
{
"name": "rollup-input-object",
"version": "1.0.0",
"main": "index.js",
"license": "MIT",
"devDependencies": {
"rollup": "^0.63.4",
"rollup-plugin-commonjs": "^9.1.4"
},
"scripts": {
"build": "rollup -c"
}
}
import commonjs from 'rollup-plugin-commonjs'
const input = { outputFileName: 'main.js' };
// const input = ['main.js']
export default {
input,
output: {
dir: 'build',
format: 'esm'
},
experimentalCodeSplitting: true,
plugins: [
commonjs()
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment