by ludbb · 11y ago · 0 comments
I say that because typical packages do not declare jsnext:main yet, so you need to pass them as a list of external packages to rollup. It seems rollup won't produce an actual bundle when externals are used, is there any documentation about this?
Taking react 0.14 as an example, rollup doesn't accept JSX so it doesn't work there either. Instead, you have to use a package that combines it with babel: rollup-babel (so now we are using a next generation next generation package). But running
rollupbabel --external=react,react-dom --format=cjs --output=bundle.js -- index.jsx
does not result in a bundle.js that bundles React. Is this too old for rollup?
No comments yet.