Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gugiserman/d6ae5465b8221284e2fbfe12d40b17ec to your computer and use it in GitHub Desktop.
Save gugiserman/d6ae5465b8221284e2fbfe12d40b17ec to your computer and use it in GitHub Desktop.
function vtexIOSourceMapURLPlugin(options) {}
vtexIOSourceMapURLPlugin.prototype.apply = function(compiler) {
compiler.plugin('emit', function(compilation, callback) {
compilation.chunks.forEach(function(chunk) {
chunk.files.forEach(function(filename) {
var chunkFileValue = compilation.assets[filename] && compilation.assets[filename]._value;
if (!chunkFileValue) return;
compilation.assets[filename]._value = chunkFileValue.replace(
'sourceMappingURL=',
'sourceMappingURL=//io.vtex.com.br/banana/'
);
});
});
callback();
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment