/
opt
/
canhelp
/
node_modules
/
next
/
dist
/
esm
/
build
/
webpack
/
plugins
/
/opt/canhelp/node_modules/next/dist/esm/build/webpack/plugins
mkdir
upload
Name
Size
Mode
Actions
minify-webpack-plugin/
-
0755
rm
next-types-plugin/
-
0755
rm
telemetry-plugin/
-
0755
rm
wellknown-errors-plugin/
-
0755
rm
app-build-manifest-plugin.js
1851
0644
edit
dl
rm
app-build-manifest-plugin.js.map
3696
0644
edit
dl
rm
build-manifest-plugin.js
11784
0644
edit
dl
rm
build-manifest-plugin.js.map
20620
0644
edit
dl
rm
copy-file-plugin.js
1998
0644
edit
dl
rm
copy-file-plugin.js.map
3910
0644
edit
dl
rm
css-chunking-plugin.js
13962
0644
edit
dl
rm
css-chunking-plugin.js.map
20144
0644
edit
dl
rm
css-minimizer-plugin.js
3621
0644
edit
dl
rm
css-minimizer-plugin.js.map
6668
0644
edit
dl
rm
devtools-ignore-list-plugin.js
3155
0644
edit
dl
rm
devtools-ignore-list-plugin.js.map
5703
0644
edit
dl
rm
eval-source-map-dev-tool-plugin.js
9951
0644
edit
dl
rm
eval-source-map-dev-tool-plugin.js.map
17814
0644
edit
dl
rm
flight-client-entry-plugin.js
39879
0644
edit
dl
rm
flight-client-entry-plugin.js.map
65962
0644
edit
dl
rm
flight-manifest-plugin.js
21393
0644
edit
dl
rm
flight-manifest-plugin.js.map
33656
0644
edit
dl
rm
jsconfig-paths-plugin.js
7520
0644
edit
dl
rm
jsconfig-paths-plugin.js.map
14188
0644
edit
dl
rm
memory-with-gc-cache-plugin.js
4467
0644
edit
dl
rm
memory-with-gc-cache-plugin.js.map
6975
0644
edit
dl
rm
middleware-plugin.js
28463
0644
edit
dl
rm
middleware-plugin.js.map
49657
0644
edit
dl
rm
mini-css-extract-plugin.js
350
0644
edit
dl
rm
mini-css-extract-plugin.js.map
559
0644
edit
dl
rm
next-drop-client-page-plugin.js
3135
0644
edit
dl
rm
next-drop-client-page-plugin.js.map
5226
0644
edit
dl
rm
next-font-manifest-plugin.js
7218
0644
edit
dl
rm
next-font-manifest-plugin.js.map
10922
0644
edit
dl
rm
next-trace-entrypoints-plugin.js
28571
0644
edit
dl
rm
next-trace-entrypoints-plugin.js.map
45925
0644
edit
dl
rm
nextjs-require-cache-hot-reloader.js
1817
0644
edit
dl
rm
nextjs-require-cache-hot-reloader.js.map
3460
0644
edit
dl
rm
optional-peer-dependency-resolve-plugin.js
1861
0644
edit
dl
rm
optional-peer-dependency-resolve-plugin.js.map
3023
0644
edit
dl
rm
pages-manifest-plugin.js
4720
0644
edit
dl
rm
pages-manifest-plugin.js.map
9182
0644
edit
dl
rm
profiling-plugin.js
12742
0644
edit
dl
rm
profiling-plugin.js.map
22329
0644
edit
dl
rm
react-loadable-plugin.js
7873
0644
edit
dl
rm
react-loadable-plugin.js.map
13557
0644
edit
dl
rm
rspack-flight-client-entry-plugin.js
4029
0644
edit
dl
rm
rspack-flight-client-entry-plugin.js.map
8008
0644
edit
dl
rm
rspack-profiling-plugin.js
2436
0644
edit
dl
rm
rspack-profiling-plugin.js.map
3828
0644
edit
dl
rm
slow-module-detection-plugin.js
8330
0644
edit
dl
rm
slow-module-detection-plugin.js.map
13734
0644
edit
dl
rm
subresource-integrity-plugin.js
2238
0644
edit
dl
rm
subresource-integrity-plugin.js.map
4380
0644
edit
dl
rm
Edit:
/opt/canhelp/node_modules/next/dist/esm/build/webpack/plugins/css-minimizer-plugin.js.map
(6668B)
{"version":3,"sources":["../../../../src/build/webpack/plugins/css-minimizer-plugin.ts"],"sourcesContent":["import cssnanoSimple from 'next/dist/compiled/cssnano-simple'\nimport postcssScss from 'next/dist/compiled/postcss-scss'\nimport postcss from 'postcss'\nimport type { Parser } from 'postcss'\nimport { webpack, sources } from 'next/dist/compiled/webpack/webpack'\nimport { getCompilationSpan } from '../utils'\n\n// https://github.com/NMFR/optimize-css-assets-webpack-plugin/blob/0a410a9bf28c7b0e81a3470a13748e68ca2f50aa/src/index.js#L20\nconst CSS_REGEX = /\\.css(\\?.*)?$/i\n\ntype CssMinimizerPluginOptions = {\n postcssOptions: {\n map: false | { prev?: string | false; inline: boolean; annotation: boolean }\n }\n}\n\nexport class CssMinimizerPlugin {\n __next_css_remove = true\n\n private options: CssMinimizerPluginOptions\n\n constructor(options: CssMinimizerPluginOptions) {\n this.options = options\n }\n\n optimizeAsset(file: string, asset: any) {\n const postcssOptions = {\n ...this.options.postcssOptions,\n to: file,\n from: file,\n\n // We don't actually add this parser to support Sass. It can also be used\n // for inline comment support. See the README:\n // https://github.com/postcss/postcss-scss/blob/master/README.md#2-inline-comments-for-postcss\n parser: postcssScss as any as Parser,\n }\n\n let input: string\n if (postcssOptions.map && asset.sourceAndMap) {\n const { source, map } = asset.sourceAndMap()\n input = source\n postcssOptions.map.prev = map ? map : false\n } else {\n input = asset.source()\n }\n\n return postcss([cssnanoSimple({ colormin: false }, postcss)])\n .process(input, postcssOptions)\n .then((res) => {\n if (res.map) {\n return new sources.SourceMapSource(res.css, file, res.map.toJSON())\n } else {\n return new sources.RawSource(res.css)\n }\n })\n }\n\n apply(compiler: webpack.Compiler) {\n compiler.hooks.compilation.tap('CssMinimizerPlugin', (compilation: any) => {\n const cache = compilation.getCache('CssMinimizerPlugin')\n compilation.hooks.processAssets.tapPromise(\n {\n name: 'CssMinimizerPlugin',\n stage: webpack.Compilation.PROCESS_ASSETS_STAGE_OPTIMIZE_SIZE,\n },\n async (assets: any) => {\n const compilationSpan =\n getCompilationSpan(compilation) || getCompilationSpan(compiler)\n const cssMinimizerSpan = compilationSpan!.traceChild(\n 'css-minimizer-plugin'\n )\n\n return cssMinimizerSpan.traceAsyncFn(async () => {\n const files = Object.keys(assets)\n await Promise.all(\n files\n .filter((file) => CSS_REGEX.test(file))\n .map(async (file) => {\n const assetSpan = cssMinimizerSpan.traceChild('minify-css')\n assetSpan.setAttribute('file', file)\n\n return assetSpan.traceAsyncFn(async () => {\n const assetSource = compilation.getAsset(file).source\n const etag = cache.getLazyHashedEtag(assetSource)\n const cachedResult = await cache.getPromise(file, etag)\n\n assetSpan.setAttribute(\n 'cache',\n cachedResult ? 'HIT' : 'MISS'\n )\n if (cachedResult) {\n compilation.updateAsset(file, cachedResult)\n return\n }\n\n const result = await this.optimizeAsset(file, assetSource)\n await cache.storePromise(file, etag, result)\n compilation.updateAsset(file, result)\n })\n })\n )\n })\n }\n )\n })\n }\n}\n"],"names":["cssnanoSimple","postcssScss","postcss","webpack","sources","getCompilationSpan","CSS_REGEX","CssMinimizerPlugin","constructor","options","__next_css_remove","optimizeAsset","file","asset","postcssOptions","to","from","parser","input","map","sourceAndMap","source","prev","colormin","process","then","res","SourceMapSource","css","toJSON","RawSource","apply","compiler","hooks","compilation","tap","cache","getCache","processAssets","tapPromise","name","stage","Compilation","PROCESS_ASSETS_STAGE_OPTIMIZE_SIZE","assets","compilationSpan","cssMinimizerSpan","traceChild","traceAsyncFn","files","Object","keys","Promise","all","filter","test","assetSpan","setAttribute","assetSource","getAsset","etag","getLazyHashedEtag","cachedResult","getPromise","updateAsset","result","storePromise"],"mappings":"AAAA,OAAOA,mBAAmB,oCAAmC;AAC7D,OAAOC,iBAAiB,kCAAiC;AACzD,OAAOC,aAAa,UAAS;AAE7B,SAASC,OAAO,EAAEC,OAAO,QAAQ,qCAAoC;AACrE,SAASC,kBAAkB,QAAQ,WAAU;AAE7C,4HAA4H;AAC5H,MAAMC,YAAY;AAQlB,OAAO,MAAMC;IAKXC,YAAYC,OAAkC,CAAE;aAJhDC,oBAAoB;QAKlB,IAAI,CAACD,OAAO,GAAGA;IACjB;IAEAE,cAAcC,IAAY,EAAEC,KAAU,EAAE;QACtC,MAAMC,iBAAiB;YACrB,GAAG,IAAI,CAACL,OAAO,CAACK,cAAc;YAC9BC,IAAIH;YACJI,MAAMJ;YAEN,yEAAyE;YACzE,8CAA8C;YAC9C,8FAA8F;YAC9FK,QAAQhB;QACV;QAEA,IAAIiB;QACJ,IAAIJ,eAAeK,GAAG,IAAIN,MAAMO,YAAY,EAAE;YAC5C,MAAM,EAAEC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