Only generate sourcemaps when given API option
Test for sourcemaps