In cases where no .map files are found for a chunk, attempting to replace the map file's name threw
an error because map=null (and the code expected a string). Additionally, calling cb() when no map/file
is found causes cb() to be called multiple times because this function is run for each chunk. This is
fixed by returning null and then filtering out falsey values from the result of the async map.
I ran into issues around this area of then code when attempting to debug #3. These adjustments mean I am able to build a hello world nextjs app and upload the sourcemaps.
In cases where no .map files are found for a chunk, attempting to replace the map file's name threw an error because map=null (and the code expected a string). Additionally, calling cb() when no map/file is found causes cb() to be called multiple times because this function is run for each chunk. This is fixed by returning null and then filtering out falsey values from the result of the async map.
I ran into issues around this area of then code when attempting to debug #3. These adjustments mean I am able to build a hello world nextjs app and upload the sourcemaps.