4 * A Rollup plugin accepting a file overrides map and changing
5 * module sources to the overridden ones where provided. Files
6 * without overrides are loaded from disk.
8 * @param {Map<string, string>} fileOverrides
10 module.exports = ( fileOverrides ) => {
12 name: "jquery-file-overrides",
14 if ( fileOverrides.has( id ) ) {
16 // Replace the module by a fake source.
17 return fileOverrides.get( id );
20 // Handle this module via the file system.