I'm using Rollup.js with plugins
Error: Dynamic requires are not currently supported by rollup-plugin-commonjs
The README.md on the Sinon.js GitHub repository says:
Sinon.JS v1.x as source doesn't work with AMD loaders / RequireJS / Webpack / Browserify. For that you will have to use a pre-built version.
This has been resolved in Sinon v2.x; Please don't report this as a bug.
So it's not possible to bundle Sinon with neither Rollup.js nor Webpack. I think the best option is to use Sinon v2.x. You can install it using the following command:
npm install sinon@next
However, some Sinon plugins might not work with Sinon v2.x; for example
sinon-chai requires Sinon