I've been using Rollup in a project that is using Lerna to manage package dependencies.
The flow of this set up is:
lerna bootstrapnpm run prepublish in each package as well as npm linknpm run prepublish step I have a rollup call: "prepublish": "rollup -c"What I noticed is that warnings are swallowed by Lerna and actually resulted in a bad build, is there anyway to throw on a warning with the CLI?
yep — you can use a custom onwarn handler for that:
// rollup.config.js
export default {
// ...
onwarn: warning => {
throw new Error(warning.message);
}
};
Most helpful comment
yep — you can use a custom
onwarnhandler for that: