/
opt
/
canhelp
/
node_modules
/
next
/
dist
/
build
/
webpack
/
loaders
/
/opt/canhelp/node_modules/next/dist/build/webpack/loaders
mkdir
upload
Name
Size
Mode
Actions
css-loader/
-
0755
rm
devtool/
-
0755
rm
lightningcss-loader/
-
0755
rm
metadata/
-
0755
rm
next-app-loader/
-
0755
rm
next-edge-app-route-loader/
-
0755
rm
next-edge-ssr-loader/
-
0755
rm
next-flight-loader/
-
0755
rm
next-font-loader/
-
0755
rm
next-image-loader/
-
0755
rm
next-route-loader/
-
0755
rm
next-style-loader/
-
0755
rm
postcss-loader/
-
0755
rm
resolve-url-loader/
-
0755
rm
empty-loader.d.ts
156
0644
edit
dl
rm
empty-loader.js
320
0644
edit
dl
rm
empty-loader.js.map
388
0644
edit
dl
rm
error-loader.d.ts
156
0644
edit
dl
rm
error-loader.js
1428
0644
edit
dl
rm
error-loader.js.map
1674
0644
edit
dl
rm
get-module-build-info.d.ts
1495
0644
edit
dl
rm
get-module-build-info.js
358
0644
edit
dl
rm
get-module-build-info.js.map
1937
0644
edit
dl
rm
modularize-import-loader.d.ts
639
0644
edit
dl
rm
modularize-import-loader.js
1255
0644
edit
dl
rm
modularize-import-loader.js.map
1720
0644
edit
dl
rm
next-barrel-loader.d.ts
3140
0644
edit
dl
rm
next-barrel-loader.js
10345
0644
edit
dl
rm
next-barrel-loader.js.map
15505
0644
edit
dl
rm
next-client-pages-loader.d.ts
186
0644
edit
dl
rm
next-client-pages-loader.js
1238
0644
edit
dl
rm
next-client-pages-loader.js.map
1906
0644
edit
dl
rm
next-edge-function-loader.d.ts
370
0644
edit
dl
rm
next-edge-function-loader.js
1908
0644
edit
dl
rm
next-edge-function-loader.js.map
3206
0644
edit
dl
rm
next-error-browser-binary-loader.d.ts
161
0644
edit
dl
rm
next-error-browser-binary-loader.js
714
0644
edit
dl
rm
next-error-browser-binary-loader.js.map
929
0644
edit
dl
rm
next-flight-action-entry-loader.d.ts
476
0644
edit
dl
rm
next-flight-action-entry-loader.js
972
0644
edit
dl
rm
next-flight-action-entry-loader.js.map
1955
0644
edit
dl
rm
next-flight-client-entry-loader.d.ts
624
0644
edit
dl
rm
next-flight-client-entry-loader.js
1978
0644
edit
dl
rm
next-flight-client-entry-loader.js.map
4102
0644
edit
dl
rm
next-flight-client-module-loader.d.ts
182
0644
edit
dl
rm
next-flight-client-module-loader.js
2235
0644
edit
dl
rm
next-flight-client-module-loader.js.map
3424
0644
edit
dl
rm
next-flight-css-loader.d.ts
420
0644
edit
dl
rm
next-flight-css-loader.js
2080
0644
edit
dl
rm
next-flight-css-loader.js.map
3060
0644
edit
dl
rm
next-flight-server-reference-proxy-loader.d.ts
237
0644
edit
dl
rm
next-flight-server-reference-proxy-loader.js
1334
0644
edit
dl
rm
next-flight-server-reference-proxy-loader.js.map
1883
0644
edit
dl
rm
next-invalid-import-error-loader.d.ts
248
0644
edit
dl
rm
next-invalid-import-error-loader.js
568
0644
edit
dl
rm
next-invalid-import-error-loader.js.map
733
0644
edit
dl
rm
next-metadata-image-loader.d.ts
506
0644
edit
dl
rm
next-metadata-image-loader.js
6313
0644
edit
dl
rm
next-metadata-image-loader.js.map
9698
0644
edit
dl
rm
next-metadata-route-loader.d.ts
398
0644
edit
dl
rm
next-metadata-route-loader.js
9423
0644
edit
dl
rm
next-metadata-route-loader.js.map
13704
0644
edit
dl
rm
next-middleware-asset-loader.d.ts
115
0644
edit
dl
rm
next-middleware-asset-loader.js
1332
0644
edit
dl
rm
next-middleware-asset-loader.js.map
1531
0644
edit
dl
rm
next-middleware-loader.d.ts
530
0644
edit
dl
rm
next-middleware-loader.js
2022
0644
edit
dl
rm
next-middleware-loader.js.map
3572
0644
edit
dl
rm
next-middleware-wasm-loader.d.ts
114
0644
edit
dl
rm
next-middleware-wasm-loader.js
1272
0644
edit
dl
rm
next-middleware-wasm-loader.js.map
1489
0644
edit
dl
rm
next-root-params-loader.d.ts
278
0644
edit
dl
rm
next-root-params-loader.js
6630
0644
edit
dl
rm
next-root-params-loader.js.map
8533
0644
edit
dl
rm
next-swc-loader.d.ts
866
0644
edit
dl
rm
next-swc-loader.js
11042
0644
edit
dl
rm
next-swc-loader.js.map
14997
0644
edit
dl
rm
utils.d.ts
589
0644
edit
dl
rm
utils.js
3771
0644
edit
dl
rm
utils.js.map
5887
0644
edit
dl
rm
Edit:
/opt/canhelp/node_modules/next/dist/build/webpack/loaders/next-swc-loader.js
(11042B)
/* Copyright (c) 2017 The swc Project Developers Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); 0 && (module.exports = { default: null, pitch: null, raw: null }); function _export(target, all) { for(var name in all)Object.defineProperty(target, name, { enumerable: true, get: all[name] }); } _export(exports, { default: function() { return swcLoader; }, pitch: function() { return pitch; }, raw: function() { return raw; } }); const _constants = require("../../../lib/constants"); const _swc = require("../../swc"); const _options = require("../../swc/options"); const _path = /*#__PURE__*/ _interop_require_wildcard(require("path")); const _webpackconfig = require("../../webpack-config"); const _handleexternals = require("../../handle-externals"); const _updatetelemetryloadercontextfromswc = require("../plugins/telemetry-plugin/update-telemetry-loader-context-from-swc"); const _constants1 = require("../../../shared/lib/constants"); function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } function _interop_require_wildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = { __proto__: null }; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for(var key in obj){ if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } const maybeExclude = (excludePath, transpilePackages)=>{ if (_webpackconfig.babelIncludeRegexes.some((r)=>r.test(excludePath))) { return false; } const shouldBeBundled = (0, _handleexternals.isResourceInPackages)(excludePath, transpilePackages); if (shouldBeBundled) return false; return excludePath.includes('node_modules'); }; // these are exact code conditions checked // for to force transpiling a `node_module` const FORCE_TRANSPILE_CONDITIONS = /next\/font|next\/dynamic|use server|use client|use cache/; // same as above, but including `import(...)`. // (note the optional whitespace: `import (...)` is also syntactically valid) const FORCE_TRANSPILE_CONDITIONS_WITH_IMPORT = new RegExp(String.raw`(?:${FORCE_TRANSPILE_CONDITIONS.source})|import\s*\(`); async function loaderTransform(source, inputSourceMap) { var _nextConfig_experimental, _nextConfig_experimental1, _nextConfig_experimental2, _nextConfig_experimental3, _nextConfig_experimental4, _nextConfig_experimental5, _nextConfig_experimental6; // Make the loader async const filename = this.resourcePath; // Ensure `.d.ts` are not processed. if (filename.endsWith('.d.ts')) { return [ source, inputSourceMap ]; } let loaderOptions = this.getOptions() || {}; const shouldMaybeExclude = maybeExclude(filename, loaderOptions.transpilePackages || []); const trackDynamicImports = shouldTrackDynamicImports(loaderOptions); if (shouldMaybeExclude) { if (!source) { throw Object.defineProperty(new Error(`Invariant might be excluded but missing source`), "__NEXT_ERROR_CODE", { value: "E368", enumerable: false, configurable: true }); } const forceTranspileConditions = trackDynamicImports ? FORCE_TRANSPILE_CONDITIONS_WITH_IMPORT : FORCE_TRANSPILE_CONDITIONS; if (!forceTranspileConditions.test(source)) { return [ source, inputSourceMap ]; } } const { isServer, rootDir, pagesDir, appDir, hasReactRefresh, nextConfig, jsConfig, supportedBrowsers, swcCacheDir, serverComponents, serverReferenceHashSalt, bundleLayer, esm } = loaderOptions; const isPageFile = pagesDir ? filename.startsWith(pagesDir) : false; const relativeFilePathFromRoot = _path.default.relative(rootDir, filename); const swcOptions = (0, _options.getLoaderSWCOptions)({ pagesDir, appDir, filename, isServer, isPageFile, development: this.mode === 'development' || !!((_nextConfig_experimental = nextConfig.experimental) == null ? void 0 : _nextConfig_experimental.allowDevelopmentBuild), isCacheComponents: (_nextConfig_experimental1 = nextConfig.experimental) == null ? void 0 : _nextConfig_experimental1.cacheComponents, hasReactRefresh, modularizeImports: nextConfig == null ? void 0 : nextConfig.modularizeImports, optimizePackageImports: nextConfig == null ? void 0 : (_nextConfig_experimental2 = nextConfig.experimental) == null ? void 0 : _nextConfig_experimental2.optimizePackageImports, swcPlugins: nextConfig == null ? void 0 : (_nextConfig_experimental3 = nextConfig.experimental) == null ? void 0 : _nextConfig_experimental3.swcPlugins, compilerOptions: nextConfig == null ? void 0 : nextConfig.compiler, optimizeServerReact: nextConfig == null ? void 0 : (_nextConfig_experimental4 = nextConfig.experimental) == null ? void 0 : _nextConfig_experimental4.optimizeServerReact, jsConfig, supportedBrowsers, swcCacheDir, relativeFilePathFromRoot, serverComponents, serverReferenceHashSalt, bundleLayer, esm, cacheHandlers: (_nextConfig_experimental5 = nextConfig.experimental) == null ? void 0 : _nextConfig_experimental5.cacheHandlers, useCacheEnabled: (_nextConfig_experimental6 = nextConfig.experimental) == null ? void 0 : _nextConfig_experimental6.useCache, trackDynamicImports }); const programmaticOptions = { ...swcOptions, filename, inputSourceMap: inputSourceMap ? JSON.stringify(inputSourceMap) : undefined, // Set the default sourcemap behavior based on Webpack's mapping flag, sourceMaps: this.sourceMap, inlineSourcesContent: this.sourceMap, // Ensure that Webpack will get a full absolute path in the sourcemap // so that it can properly map the module back to its internal cached // modules. sourceFileName: filename }; if (!programmaticOptions.inputSourceMap) { delete programmaticOptions.inputSourceMap; } // auto detect development mode if (this.mode && programmaticOptions.jsc && programmaticOptions.jsc.transform && programmaticOptions.jsc.transform.react && !Object.prototype.hasOwnProperty.call(programmaticOptions.jsc.transform.react, 'development')) { programmaticOptions.jsc.transform.react.development = this.mode === 'development'; } return (0, _swc.transform)(source, programmaticOptions).then((output)=>{ (0, _updatetelemetryloadercontextfromswc.updateTelemetryLoaderCtxFromTransformOutput)(this, output); return [ output.code, output.map ? JSON.parse(output.map) : undefined ]; }); } function shouldTrackDynamicImports(loaderOptions) { var _nextConfig_experimental; // we only need to track `import()` 1. in cacheComponents, 2. on the server (RSC and SSR) // (Note: logic duplicated in crates/next-core/src/next_server/transforms.rs) const { nextConfig, bundleLayer, compilerType } = loaderOptions; return !!((_nextConfig_experimental = nextConfig.experimental) == null ? void 0 : _nextConfig_experimental.cacheComponents) && // NOTE: `server` means nodejs. `cacheComponents` is not supported in the edge runtime, so we want to exclude it. // (also, the code generated by the dynamic imports transform relies on `CacheSignal`, which uses nodejs-specific APIs) compilerType === _constants1.COMPILER_NAMES.server && (bundleLayer === _constants.WEBPACK_LAYERS.reactServerComponents || bundleLayer === _constants.WEBPACK_LAYERS.serverSideRendering); } const EXCLUDED_PATHS = /[\\/](cache[\\/][^\\/]+\.zip[\\/]node_modules|__virtual__)[\\/]/g; function pitch() { const callback = this.async(); let loaderOptions = this.getOptions() || {}; const shouldMaybeExclude = maybeExclude(this.resourcePath, loaderOptions.transpilePackages || []); (async ()=>{ if (// if it might be excluded/no-op we can't use pitch loader !shouldMaybeExclude && // TODO: investigate swc file reading in PnP mode? !process.versions.pnp && !EXCLUDED_PATHS.test(this.resourcePath) && this.loaders.length - 1 === this.loaderIndex && (0, _path.isAbsolute)(this.resourcePath) && !await (0, _swc.isWasm)()) { this.addDependency(this.resourcePath); return loaderTransform.call(this); } })().then((r)=>{ if (r) return callback(null, ...r); callback(); }, callback); } function swcLoader(inputSource, inputSourceMap) { const callback = this.async(); loaderTransform.call(this, inputSource, inputSourceMap).then(([transformedSource, outputSourceMap])=>{ callback(null, transformedSource, outputSourceMap || inputSourceMap); }, (err)=>{ callback(err); }); } const raw = true; //# sourceMappingURL=next-swc-loader.js.map
Save
cmd:
run