Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
this.moduleById[ source ] = module;
}
}
else {
if ( resolvedId === module.id ) {
throw new Error( `A module cannot import itself (${resolvedId})` );
}
module.resolvedIds[ source ] = resolvedId;
return this.fetchModule( resolvedId, module.id );
}
});
});
return Promise.all( promises );
}
if ( options.sourceMap ) {
let url;
if ( options.sourceMap === 'inline' ) {
url = map.toUrl();
} else {
url = `${basename( dest )}.map`;
promises.push( writeFile( dest + '.map', map.toString() ) );
}
code += `\n//# ${SOURCEMAPPING_URL}=${url}`;
}
promises.push( writeFile( dest, code ) );
return Promise.all( promises );
}
};