captbaritone / webamp

Winamp 2 reimplemented for the browser
https://webamp.org
MIT License
10k stars 661 forks source link

After the upgrade to webpack 4, we have a tiny extra music-metadata-browser bundle #708

Open captbaritone opened 5 years ago

captbaritone commented 5 years ago

Here's what it contains:

var map = {
    "./aiff/index": 246,
    "./apev2/index": 261,
    "./asf/index": 262,
    "./flac/index": 266,
    "./mp4/index": 268,
    "./mpeg/index": 271,
    "./ogg/index": 274,
    "./riff/index": 280,
    "./wavpack/index": 284
};

function webpackContext(req) {
    var id = webpackContextResolve(req);
    return __webpack_require__(id);
}
function webpackContextResolve(req) {
    var id = map[req];
    if(!(id + 1)) { // check for number or string
        var e = new Error("Cannot find module '" + req + "'");
        e.code = 'MODULE_NOT_FOUND';
        throw e;
    }
    return id;
}
webpackContext.keys = function webpackContextKeys() {
    return Object.keys(map);
};
webpackContext.resolve = webpackContextResolve;
module.exports = webpackContext;
webpackContext.id = 245;

Not sure how it got there, or what it does. My first thought was that Webpack was trying to automatically split out the individual parsers, but I don't see any bundles corresponding to those formats.

captbaritone commented 5 years ago

I wonder if @Borewit recognizes what this might be.

captbaritone commented 5 years ago

I tracked this down to what I think is a bug in Webpack: https://github.com/webpack/webpack/issues/9067