/opt/canhelp/node_modules/next/dist/esm/build/webpack/plugins
NameSizeModeActions
minify-webpack-plugin/-0755rm
next-types-plugin/-0755rm
telemetry-plugin/-0755rm
wellknown-errors-plugin/-0755rm
app-build-manifest-plugin.js18510644editdlrm
app-build-manifest-plugin.js.map36960644editdlrm
build-manifest-plugin.js117840644editdlrm
build-manifest-plugin.js.map206200644editdlrm
copy-file-plugin.js19980644editdlrm
copy-file-plugin.js.map39100644editdlrm
css-chunking-plugin.js139620644editdlrm
css-chunking-plugin.js.map201440644editdlrm
css-minimizer-plugin.js36210644editdlrm
css-minimizer-plugin.js.map66680644editdlrm
devtools-ignore-list-plugin.js31550644editdlrm
devtools-ignore-list-plugin.js.map57030644editdlrm
eval-source-map-dev-tool-plugin.js99510644editdlrm
eval-source-map-dev-tool-plugin.js.map178140644editdlrm
flight-client-entry-plugin.js398790644editdlrm
flight-client-entry-plugin.js.map659620644editdlrm
flight-manifest-plugin.js213930644editdlrm
flight-manifest-plugin.js.map336560644editdlrm
jsconfig-paths-plugin.js75200644editdlrm
jsconfig-paths-plugin.js.map141880644editdlrm
memory-with-gc-cache-plugin.js44670644editdlrm
memory-with-gc-cache-plugin.js.map69750644editdlrm
middleware-plugin.js284630644editdlrm
middleware-plugin.js.map496570644editdlrm
mini-css-extract-plugin.js3500644editdlrm
mini-css-extract-plugin.js.map5590644editdlrm
next-drop-client-page-plugin.js31350644editdlrm
next-drop-client-page-plugin.js.map52260644editdlrm
next-font-manifest-plugin.js72180644editdlrm
next-font-manifest-plugin.js.map109220644editdlrm
next-trace-entrypoints-plugin.js285710644editdlrm
next-trace-entrypoints-plugin.js.map459250644editdlrm
nextjs-require-cache-hot-reloader.js18170644editdlrm
nextjs-require-cache-hot-reloader.js.map34600644editdlrm
optional-peer-dependency-resolve-plugin.js18610644editdlrm
optional-peer-dependency-resolve-plugin.js.map30230644editdlrm
pages-manifest-plugin.js47200644editdlrm
pages-manifest-plugin.js.map91820644editdlrm
profiling-plugin.js127420644editdlrm
profiling-plugin.js.map223290644editdlrm
react-loadable-plugin.js78730644editdlrm
react-loadable-plugin.js.map135570644editdlrm
rspack-flight-client-entry-plugin.js40290644editdlrm
rspack-flight-client-entry-plugin.js.map80080644editdlrm
rspack-profiling-plugin.js24360644editdlrm
rspack-profiling-plugin.js.map38280644editdlrm
slow-module-detection-plugin.js83300644editdlrm
slow-module-detection-plugin.js.map137340644editdlrm
subresource-integrity-plugin.js22380644editdlrm
subresource-integrity-plugin.js.map43800644editdlrm
Edit: /opt/canhelp/node_modules/next/dist/esm/build/webpack/plugins/subresource-integrity-plugin.js.map (4380B)
{"version":3,"sources":["../../../../src/build/webpack/plugins/subresource-integrity-plugin.ts"],"sourcesContent":["import { webpack, sources } from 'next/dist/compiled/webpack/webpack'\nimport crypto from 'crypto'\nimport { SUBRESOURCE_INTEGRITY_MANIFEST } from '../../../shared/lib/constants'\n\nconst PLUGIN_NAME = 'SubresourceIntegrityPlugin'\n\nexport type SubresourceIntegrityAlgorithm = 'sha256' | 'sha384' | 'sha512'\n\nexport class SubresourceIntegrityPlugin {\n constructor(private readonly algorithm: SubresourceIntegrityAlgorithm) {}\n\n public apply(compiler: webpack.Compiler) {\n compiler.hooks.make.tap(PLUGIN_NAME, (compilation) => {\n compilation.hooks.afterProcessAssets.tap(\n {\n name: PLUGIN_NAME,\n stage: webpack.Compilation.PROCESS_ASSETS_STAGE_ADDITIONS,\n },\n () => {\n // Collect all the assets.\n let files = new Set()\n for (const asset of compilation.getAssets()) {\n files.add(asset.name)\n }\n\n // For each file, deduped, calculate the file hash.\n const hashes: Record = {}\n for (const file of files.values()) {\n // Get the buffer for the asset.\n const asset = compilation.getAsset(file)\n if (!asset) {\n throw new Error(`could not get asset: ${file}`)\n }\n\n // Get the buffer for the asset.\n const buffer = asset.source.buffer()\n\n // Create the hash for the content.\n const hash = crypto\n .createHash(this.algorithm)\n .update(buffer)\n .digest()\n .toString('base64')\n\n hashes[file] = `${this.algorithm}-${hash}`\n }\n\n const json = JSON.stringify(hashes, null, 2)\n const file = 'server/' + SUBRESOURCE_INTEGRITY_MANIFEST\n compilation.emitAsset(\n file + '.js',\n new sources.RawSource(\n `self.__SUBRESOURCE_INTEGRITY_MANIFEST=${JSON.stringify(json)}`\n // Work around webpack 4 type of RawSource being used\n // TODO: use webpack 5 type by default\n ) as unknown as webpack.sources.RawSource\n )\n compilation.emitAsset(\n file + '.json',\n new sources.RawSource(\n json\n // Work around webpack 4 type of RawSource being used\n // TODO: use webpack 5 type by default\n ) as unknown as webpack.sources.RawSource\n )\n }\n )\n })\n }\n}\n"],"names":["webpack","sources","crypto","SUBRESOURCE_INTEGRITY_MANIFEST","PLUGIN_NAME","SubresourceIntegrityPlugin","constructor","algorithm","apply","compiler","hooks","make","tap","compilation","afterProcessAssets","name","stage","Compilation","PROCESS_ASSETS_STAGE_ADDITIONS","files","Set","asset","getAssets","add","hashes","file","values","getAsset","Error","buffer","source","hash","createHash","update","digest","toString","json","JSON","stringify","emitAsset","RawSource"],"mappings":"AAAA,SAASA,OAAO,EAAEC,OAAO,QAAQ,qCAAoC;AACrE,OAAOC,YAAY,SAAQ;AAC3B,SAASC,8BAA8B,QAAQ,gCAA+B;AAE9E,MAAMC,cAAc;AAIpB,OAAO,MAAMC;IACXC,YAAY,AAAiBC,SAAwC,CAAE;aAA1CA,YAAAA;IAA2C;IAEjEC,MAAMC,QAA0B,EAAE;QACvCA,SAASC,KAAK,CAACC,IAAI,CAACC,GAAG,CAACR,aAAa,CAACS;YACpCA,YAAYH,KAAK,CAACI,kBAAkB,CAACF,GAAG,CACtC;gBACEG,MAAMX;gBACNY,OAAOhB,QAAQiB,WAAW,CAACC,8BAA8B;YAC3D,GACA;gBACE,0BAA0B;gBAC1B,IAAIC,QAAQ,IAAIC;gBAChB,KAAK,MAAMC,SAASR,YAAYS,SAAS,GAAI;oBAC3CH,MAAMI,GAAG,CAACF,MAAMN,IAAI;gBACtB;gBAEA,mDAAmD;gBACnD,MAAMS,SAAiC,CAAC;gBACxC,KAAK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