move sourcemap generator to environment