in packages/next/plugin-webpack5-os/src/OSJsonpPlugin.ts [61:75]
private getId(compiler: Compiler): string {
const { output } = compiler.options;
if (!output) {
return '';
}
const { library } = output;
if (typeof library === 'string') {
return library;
}
if (typeof library === 'object') {
// @ts-ignore
return library.name;
}
throw new Error('library for os jsonp plugin should be string');
}