-
-
Save miaulightouch/7fa7b42369b216873183ba38e8ab8265 to your computer and use it in GitHub Desktop.
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
// rollup.config.js | |
import resolve from 'rollup-plugin-node-resolve' | |
import commonjs from 'rollup-plugin-commonjs' | |
const esm = process.env.BABEL_ENV === 'esm' | |
export default { | |
input: 'src/index.js', | |
output: { | |
format: esm ? 'esm' : 'cjs', | |
file: `bundle.js`, | |
dir: esm ? 'esm' : 'lib' | |
}, | |
plugins: [ | |
resolve(), | |
commonjs() | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment