@ohos-ports/rsbuild-core 2.2.9-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +27 -0
- package/bin/rsbuild.js +20 -0
- package/compiled/@rstackjs/load-config/index.d.ts +87 -0
- package/compiled/@rstackjs/load-config/license +21 -0
- package/compiled/@rstackjs/load-config/package.json +1 -0
- package/compiled/chokidar/index.d.ts +385 -0
- package/compiled/chokidar/license +21 -0
- package/compiled/chokidar/package.json +1 -0
- package/compiled/connect-next/index.d.ts +57 -0
- package/compiled/connect-next/license +26 -0
- package/compiled/connect-next/package.json +1 -0
- package/compiled/cors/index.d.ts +56 -0
- package/compiled/cors/license +22 -0
- package/compiled/cors/package.json +1 -0
- package/compiled/css-loader/api.js +85 -0
- package/compiled/css-loader/getUrl.js +26 -0
- package/compiled/css-loader/index.d.ts +1 -0
- package/compiled/css-loader/index.js +2 -0
- package/compiled/css-loader/license +20 -0
- package/compiled/css-loader/noSourceMaps.js +5 -0
- package/compiled/css-loader/package.json +1 -0
- package/compiled/css-loader/sourceMaps.js +16 -0
- package/compiled/html-rspack-plugin/default_index.ejs +9 -0
- package/compiled/html-rspack-plugin/htmlLoader.js +157 -0
- package/compiled/html-rspack-plugin/index.d.ts +395 -0
- package/compiled/html-rspack-plugin/index.js +2400 -0
- package/compiled/html-rspack-plugin/license +20 -0
- package/compiled/html-rspack-plugin/package.json +1 -0
- package/compiled/http-proxy-middleware/index.d.ts +455 -0
- package/compiled/http-proxy-middleware/license +22 -0
- package/compiled/http-proxy-middleware/package.json +1 -0
- package/compiled/jiti/LICENSE +21 -0
- package/compiled/jiti/README.md +258 -0
- package/compiled/jiti/dist/babel.cjs +47446 -0
- package/compiled/jiti/dist/jiti.cjs +5990 -0
- package/compiled/jiti/lib/jiti-cli.mjs +19 -0
- package/compiled/jiti/lib/jiti-hooks.mjs +89 -0
- package/compiled/jiti/lib/jiti-native.mjs +76 -0
- package/compiled/jiti/lib/jiti-register.d.mts +1 -0
- package/compiled/jiti/lib/jiti-register.mjs +2 -0
- package/compiled/jiti/lib/jiti-static.mjs +19 -0
- package/compiled/jiti/lib/jiti.cjs +24 -0
- package/compiled/jiti/lib/jiti.d.cts +8 -0
- package/compiled/jiti/lib/jiti.d.mts +8 -0
- package/compiled/jiti/lib/jiti.mjs +23 -0
- package/compiled/jiti/lib/types.d.ts +420 -0
- package/compiled/jiti/package.json +146 -0
- package/compiled/postcss/index.js +1 -0
- package/compiled/postcss/lib/at-rule.d.ts +139 -0
- package/compiled/postcss/lib/comment.d.ts +67 -0
- package/compiled/postcss/lib/container.d.ts +474 -0
- package/compiled/postcss/lib/css-syntax-error.d.ts +247 -0
- package/compiled/postcss/lib/declaration.d.ts +150 -0
- package/compiled/postcss/lib/document.d.ts +68 -0
- package/compiled/postcss/lib/fromJSON.d.ts +9 -0
- package/compiled/postcss/lib/input.d.ts +226 -0
- package/compiled/postcss/lib/lazy-result.d.ts +189 -0
- package/compiled/postcss/lib/list.d.ts +60 -0
- package/compiled/postcss/lib/no-work-result.d.ts +45 -0
- package/compiled/postcss/lib/node.d.ts +555 -0
- package/compiled/postcss/lib/parse.d.ts +9 -0
- package/compiled/postcss/lib/postcss.d.ts +464 -0
- package/compiled/postcss/lib/previous-map.d.ts +80 -0
- package/compiled/postcss/lib/processor.d.ts +114 -0
- package/compiled/postcss/lib/result.d.ts +204 -0
- package/compiled/postcss/lib/root.d.ts +86 -0
- package/compiled/postcss/lib/rule.d.ts +126 -0
- package/compiled/postcss/lib/source-map-js.d.ts +4 -0
- package/compiled/postcss/lib/stringifier.d.ts +45 -0
- package/compiled/postcss/lib/stringify.d.ts +9 -0
- package/compiled/postcss/lib/warning.d.ts +146 -0
- package/compiled/postcss/license +20 -0
- package/compiled/postcss/package.json +1 -0
- package/compiled/postcss-loader/index.d.ts +1 -0
- package/compiled/postcss-loader/index.js +721 -0
- package/compiled/postcss-loader/license +20 -0
- package/compiled/postcss-loader/package.json +1 -0
- package/compiled/rslog/index.d.ts +98 -0
- package/compiled/rslog/license +21 -0
- package/compiled/rslog/package.json +1 -0
- package/compiled/rspack-chain/license +22 -0
- package/compiled/rspack-chain/package.json +1 -0
- package/compiled/rspack-chain/types/index.d.ts +515 -0
- package/compiled/rspack-manifest-plugin/index.d.ts +52 -0
- package/compiled/rspack-manifest-plugin/license +21 -0
- package/compiled/rspack-manifest-plugin/package.json +1 -0
- package/compiled/style-loader/index.d.ts +1 -0
- package/compiled/style-loader/index.js +370 -0
- package/compiled/style-loader/license +20 -0
- package/compiled/style-loader/package.json +1 -0
- package/compiled/style-loader/runtime/injectStylesIntoLinkTag.js +29 -0
- package/compiled/style-loader/runtime/injectStylesIntoStyleTag.js +84 -0
- package/compiled/style-loader/runtime/insertBySelector.js +34 -0
- package/compiled/style-loader/runtime/insertStyleElement.js +10 -0
- package/compiled/style-loader/runtime/isEqualLocals.js +28 -0
- package/compiled/style-loader/runtime/isOldIE.js +17 -0
- package/compiled/style-loader/runtime/setAttributesWithAttributes.js +13 -0
- package/compiled/style-loader/runtime/setAttributesWithAttributesAndNonce.js +9 -0
- package/compiled/style-loader/runtime/setAttributesWithoutAttributes.js +10 -0
- package/compiled/style-loader/runtime/singletonStyleDomAPI.js +86 -0
- package/compiled/style-loader/runtime/styleDomAPI.js +61 -0
- package/compiled/style-loader/runtime/styleTagTransform.js +14 -0
- package/compiled/ws/index.d.ts +445 -0
- package/compiled/ws/license +21 -0
- package/compiled/ws/package.json +1 -0
- package/dist/build.d.ts +4 -0
- package/dist/c.js +10 -0
- package/dist/chokidar.js +2 -0
- package/dist/chokidar.js.LICENSE.txt +1 -0
- package/dist/cli/commands.d.ts +31 -0
- package/dist/cli/index.d.ts +7 -0
- package/dist/cli/init.d.ts +7 -0
- package/dist/client/f~0.js +22 -0
- package/dist/client/hmr.js +267 -0
- package/dist/client/overlay.js +214 -0
- package/dist/configChain.d.ts +84 -0
- package/dist/connect-next.js +2 -0
- package/dist/connect-next.js.LICENSE.txt +57 -0
- package/dist/constants.d.ts +67 -0
- package/dist/cors.js +188 -0
- package/dist/cors.js.LICENSE.txt +11 -0
- package/dist/createCompiler.d.ts +6 -0
- package/dist/createContext.d.ts +12 -0
- package/dist/createRsbuild.d.ts +4 -0
- package/dist/cssUrlLoader.mjs +34 -0
- package/dist/defaultConfig.d.ts +23 -0
- package/dist/freshImport.js +90 -0
- package/dist/helpers/cachedImport.d.ts +2 -0
- package/dist/helpers/compiler.d.ts +5 -0
- package/dist/helpers/css.d.ts +3 -0
- package/dist/helpers/exitHook.d.ts +3 -0
- package/dist/helpers/format.d.ts +4 -0
- package/dist/helpers/fs.d.ts +16 -0
- package/dist/helpers/html.d.ts +2 -0
- package/dist/helpers/index.d.ts +29 -0
- package/dist/helpers/overlayConfig.d.ts +4 -0
- package/dist/helpers/packageJson.d.ts +9 -0
- package/dist/helpers/path.d.ts +22 -0
- package/dist/helpers/restartManager.d.ts +15 -0
- package/dist/helpers/stats.d.ts +17 -0
- package/dist/helpers/url.d.ts +11 -0
- package/dist/helpers/vendors.d.ts +12 -0
- package/dist/helpers/version.d.ts +7 -0
- package/dist/hooks.d.ts +41 -0
- package/dist/http-proxy-middleware.js +14 -0
- package/dist/http-proxy-middleware.js.LICENSE.txt +34 -0
- package/dist/ignoreCssLoader.mjs +9 -0
- package/dist/index.d.ts +28 -0
- package/dist/index.js +1 -0
- package/dist/initConfigs.d.ts +18 -0
- package/dist/initPlugins.d.ts +7 -0
- package/dist/inspectConfig.d.ts +7 -0
- package/dist/launch-editor-middleware.js +1 -0
- package/dist/loadConfig.d.ts +31 -0
- package/dist/loadEnv.d.ts +54 -0
- package/dist/loader/cssUrlLoader.d.ts +9 -0
- package/dist/loader/ignoreCssLoader.d.ts +10 -0
- package/dist/loader/transformLoader.d.ts +8 -0
- package/dist/loader/transformRawLoader.d.ts +4 -0
- package/dist/loader/workerLoader.d.ts +6 -0
- package/dist/logger.d.ts +24 -0
- package/dist/m.js +10348 -0
- package/dist/m.js.LICENSE.txt +26 -0
- package/dist/manifest-plugin.js +1 -0
- package/dist/memfs.js +1 -0
- package/dist/mergeConfig.d.ts +7 -0
- package/dist/open.js +2 -0
- package/dist/pluginHelper.d.ts +4 -0
- package/dist/pluginManager.d.ts +19 -0
- package/dist/plugins/appIcon.d.ts +2 -0
- package/dist/plugins/asset.d.ts +3 -0
- package/dist/plugins/basic.d.ts +4 -0
- package/dist/plugins/cache.d.ts +2 -0
- package/dist/plugins/cleanOutput.d.ts +2 -0
- package/dist/plugins/css.d.ts +8 -0
- package/dist/plugins/define.d.ts +2 -0
- package/dist/plugins/entry.d.ts +2 -0
- package/dist/plugins/externals.d.ts +9 -0
- package/dist/plugins/fileSize.d.ts +7 -0
- package/dist/plugins/html.d.ts +9 -0
- package/dist/plugins/inlineChunk.d.ts +6 -0
- package/dist/plugins/lazyCompilation.d.ts +2 -0
- package/dist/plugins/manifest.d.ts +2 -0
- package/dist/plugins/minimize.d.ts +10 -0
- package/dist/plugins/moduleFederation.d.ts +2 -0
- package/dist/plugins/nodeAddons.d.ts +2 -0
- package/dist/plugins/nonce.d.ts +2 -0
- package/dist/plugins/output.d.ts +2 -0
- package/dist/plugins/progress.d.ts +2 -0
- package/dist/plugins/resolve.d.ts +2 -0
- package/dist/plugins/resourceHints.d.ts +2 -0
- package/dist/plugins/rsdoctor.d.ts +2 -0
- package/dist/plugins/rspackProfile.d.ts +4 -0
- package/dist/plugins/server.d.ts +3 -0
- package/dist/plugins/sourceMap.d.ts +2 -0
- package/dist/plugins/splitChunks.d.ts +4 -0
- package/dist/plugins/sri.d.ts +2 -0
- package/dist/plugins/swc.d.ts +4 -0
- package/dist/plugins/target.d.ts +2 -0
- package/dist/plugins/wasm.d.ts +2 -0
- package/dist/plugins/worker.d.ts +2 -0
- package/dist/r.js +7 -0
- package/dist/range-parser.js +55 -0
- package/dist/range-parser.js.LICENSE.txt +6 -0
- package/dist/remapping.js +201 -0
- package/dist/restart.d.ts +15 -0
- package/dist/rslib-runtime.js +49 -0
- package/dist/rspack-plugins/RsbuildHtmlPlugin.d.ts +37 -0
- package/dist/rspack-plugins/resource-hints/HtmlResourceHintsPlugin.d.ts +36 -0
- package/dist/rspack-plugins/resource-hints/doesChunkBelongToHtml.d.ts +27 -0
- package/dist/rspack-plugins/resource-hints/extractChunks.d.ts +22 -0
- package/dist/rspack-plugins/resource-hints/getResourceType.d.ts +21 -0
- package/dist/rspackConfig.d.ts +8 -0
- package/dist/server/ansiHTML.d.ts +3 -0
- package/dist/server/assets-middleware/getFileFromUrl.d.ts +11 -0
- package/dist/server/assets-middleware/index.d.ts +35 -0
- package/dist/server/assets-middleware/memoryFileSystem.d.ts +2 -0
- package/dist/server/assets-middleware/middleware.d.ts +7 -0
- package/dist/server/assets-middleware/parseTokenList.d.ts +1 -0
- package/dist/server/assets-middleware/setupOutputFileSystem.d.ts +3 -0
- package/dist/server/assets-middleware/setupWriteToDisk.d.ts +15 -0
- package/dist/server/browserLogs.d.ts +8 -0
- package/dist/server/buildManager.d.ts +32 -0
- package/dist/server/cliShortcuts.d.ts +19 -0
- package/dist/server/compileState.d.ts +5 -0
- package/dist/server/devMiddlewares.d.ts +18 -0
- package/dist/server/devServer.d.ts +47 -0
- package/dist/server/environment.d.ts +8 -0
- package/dist/server/gracefulShutdown.d.ts +8 -0
- package/dist/server/gzipMiddleware.d.ts +2 -0
- package/dist/server/helper.d.ts +118 -0
- package/dist/server/historyApiFallback.d.ts +10 -0
- package/dist/server/hmrFallback.d.ts +1 -0
- package/dist/server/httpServer.d.ts +7 -0
- package/dist/server/middlewares.d.ts +31 -0
- package/dist/server/open.d.ts +12 -0
- package/dist/server/overlay.d.ts +3 -0
- package/dist/server/previewServer.d.ts +4 -0
- package/dist/server/proxy.d.ts +7 -0
- package/dist/server/publicPathnames.d.ts +2 -0
- package/dist/server/runner/asModule.d.ts +2 -0
- package/dist/server/runner/basic.d.ts +25 -0
- package/dist/server/runner/cjs.d.ts +10 -0
- package/dist/server/runner/esm.d.ts +6 -0
- package/dist/server/runner/index.d.ts +6 -0
- package/dist/server/runner/type.d.ts +42 -0
- package/dist/server/serverSetup.d.ts +2 -0
- package/dist/server/socketServer.d.ts +113 -0
- package/dist/server/watchFiles.d.ts +15 -0
- package/dist/sirv.js +122 -0
- package/dist/tinyglobby.js +1 -0
- package/dist/trace-mapping.js +548 -0
- package/dist/transformLoader.mjs +36 -0
- package/dist/transformRawLoader.mjs +4 -0
- package/dist/types/config.d.ts +1796 -0
- package/dist/types/context.d.ts +89 -0
- package/dist/types/hooks.d.ts +261 -0
- package/dist/types/index.d.ts +8 -0
- package/dist/types/plugin.d.ts +479 -0
- package/dist/types/rsbuild.d.ts +241 -0
- package/dist/types/rspack.d.ts +10 -0
- package/dist/types/thirdParty.d.ts +161 -0
- package/dist/types/utils.d.ts +16 -0
- package/dist/workerLoader.mjs +94 -0
- package/dist/ws.js +2 -0
- package/package.json +107 -0
- package/static/openChrome.applescript +95 -0
- package/types.d.ts +422 -0
|
@@ -0,0 +1,721 @@
|
|
|
1
|
+
(() => {
|
|
2
|
+
"use strict";
|
|
3
|
+
var __webpack_modules__ = {
|
|
4
|
+
841: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
5
|
+
module.exports = __nccwpck_require__(147)["default"];
|
|
6
|
+
},
|
|
7
|
+
147: (__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
8
|
+
var __webpack_unused_export__;
|
|
9
|
+
__webpack_unused_export__ = { value: true };
|
|
10
|
+
exports["default"] = loader;
|
|
11
|
+
var _nodePath = _interopRequireDefault(__nccwpck_require__(760));
|
|
12
|
+
var _utils = __nccwpck_require__(870);
|
|
13
|
+
function _interopRequireDefault(e) {
|
|
14
|
+
return e && e.__esModule ? e : { default: e };
|
|
15
|
+
}
|
|
16
|
+
let hasExplicitDependencyOnPostCSS = false;
|
|
17
|
+
async function loader(content, sourceMap, meta) {
|
|
18
|
+
const options = this.getOptions();
|
|
19
|
+
const callback = this.async();
|
|
20
|
+
const configOption =
|
|
21
|
+
typeof options.postcssOptions === "undefined" ||
|
|
22
|
+
typeof options.postcssOptions.config === "undefined"
|
|
23
|
+
? true
|
|
24
|
+
: options.postcssOptions.config;
|
|
25
|
+
let implementation;
|
|
26
|
+
try {
|
|
27
|
+
implementation = (0, _utils.getPostcssImplementation)(
|
|
28
|
+
this,
|
|
29
|
+
options.implementation,
|
|
30
|
+
);
|
|
31
|
+
} catch (error) {
|
|
32
|
+
callback(error);
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
if (!implementation) {
|
|
36
|
+
callback(
|
|
37
|
+
new Error(
|
|
38
|
+
`The Postcss implementation "${options.implementation}" not found`,
|
|
39
|
+
),
|
|
40
|
+
);
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
let loadedConfig;
|
|
44
|
+
if (configOption) {
|
|
45
|
+
try {
|
|
46
|
+
loadedConfig = await (0, _utils.loadConfig)(
|
|
47
|
+
this,
|
|
48
|
+
configOption,
|
|
49
|
+
options.postcssOptions,
|
|
50
|
+
);
|
|
51
|
+
} catch (error) {
|
|
52
|
+
callback(error);
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
const { plugins, processOptions } = await (0, _utils.getPostcssOptions)(
|
|
57
|
+
this,
|
|
58
|
+
loadedConfig,
|
|
59
|
+
options.postcssOptions,
|
|
60
|
+
);
|
|
61
|
+
const useSourceMap =
|
|
62
|
+
typeof options.sourceMap !== "undefined"
|
|
63
|
+
? options.sourceMap
|
|
64
|
+
: this.sourceMap;
|
|
65
|
+
if (useSourceMap) {
|
|
66
|
+
processOptions.map = {
|
|
67
|
+
inline: false,
|
|
68
|
+
annotation: false,
|
|
69
|
+
...processOptions.map,
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
if (sourceMap && processOptions.map) {
|
|
73
|
+
processOptions.map.prev = (0, _utils.normalizeSourceMap)(
|
|
74
|
+
sourceMap,
|
|
75
|
+
this.context,
|
|
76
|
+
);
|
|
77
|
+
}
|
|
78
|
+
let root;
|
|
79
|
+
if (meta && meta.ast && meta.ast.type === "postcss") {
|
|
80
|
+
({ root } = meta.ast);
|
|
81
|
+
}
|
|
82
|
+
if (!root && options.execute) {
|
|
83
|
+
content = (0, _utils.exec)(content, this);
|
|
84
|
+
}
|
|
85
|
+
let result;
|
|
86
|
+
let processor;
|
|
87
|
+
try {
|
|
88
|
+
processor = implementation(plugins);
|
|
89
|
+
result = await processor.process(root || content, processOptions);
|
|
90
|
+
} catch (error) {
|
|
91
|
+
if (
|
|
92
|
+
!hasExplicitDependencyOnPostCSS &&
|
|
93
|
+
processor &&
|
|
94
|
+
processor.version &&
|
|
95
|
+
processor.version.startsWith("7.")
|
|
96
|
+
) {
|
|
97
|
+
const packageJSONDir = (0, _utils.findPackageJSONDir)(
|
|
98
|
+
process.cwd(),
|
|
99
|
+
this.fs.statSync,
|
|
100
|
+
);
|
|
101
|
+
if (packageJSONDir) {
|
|
102
|
+
let bufferOfPackageJSON;
|
|
103
|
+
try {
|
|
104
|
+
bufferOfPackageJSON = this.fs.readFileSync(
|
|
105
|
+
_nodePath.default.resolve(packageJSONDir, "package.json"),
|
|
106
|
+
"utf8",
|
|
107
|
+
);
|
|
108
|
+
} catch {}
|
|
109
|
+
if (bufferOfPackageJSON) {
|
|
110
|
+
let pkg;
|
|
111
|
+
try {
|
|
112
|
+
pkg = JSON.parse(bufferOfPackageJSON);
|
|
113
|
+
} catch {}
|
|
114
|
+
if (pkg) {
|
|
115
|
+
const { dependencies = {}, devDependencies = {} } = pkg;
|
|
116
|
+
if (!dependencies.postcss && !devDependencies.postcss) {
|
|
117
|
+
this.emitWarning(
|
|
118
|
+
new Error(
|
|
119
|
+
"Add postcss as project dependency. postcss is not a peer dependency for postcss-loader. " +
|
|
120
|
+
"Use `npm install postcss` or `yarn add postcss`",
|
|
121
|
+
),
|
|
122
|
+
);
|
|
123
|
+
} else {
|
|
124
|
+
hasExplicitDependencyOnPostCSS = true;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
(0, _utils.reportError)(this, callback, error);
|
|
131
|
+
return;
|
|
132
|
+
}
|
|
133
|
+
for (const warning of result.warnings()) {
|
|
134
|
+
this.emitWarning((0, _utils.warningFactory)(warning));
|
|
135
|
+
}
|
|
136
|
+
for (const message of result.messages) {
|
|
137
|
+
switch (message.type) {
|
|
138
|
+
case "dependency":
|
|
139
|
+
this.addDependency(message.file);
|
|
140
|
+
break;
|
|
141
|
+
case "build-dependency":
|
|
142
|
+
this.addBuildDependency(message.file);
|
|
143
|
+
break;
|
|
144
|
+
case "missing-dependency":
|
|
145
|
+
this.addMissingDependency(message.file);
|
|
146
|
+
break;
|
|
147
|
+
case "context-dependency":
|
|
148
|
+
this.addContextDependency(message.file);
|
|
149
|
+
break;
|
|
150
|
+
case "dir-dependency":
|
|
151
|
+
this.addContextDependency(message.dir);
|
|
152
|
+
break;
|
|
153
|
+
case "asset":
|
|
154
|
+
if (message.content && message.file) {
|
|
155
|
+
this.emitFile(
|
|
156
|
+
message.file,
|
|
157
|
+
message.content,
|
|
158
|
+
message.sourceMap,
|
|
159
|
+
message.info,
|
|
160
|
+
);
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
let map = result.map ? result.map.toJSON() : undefined;
|
|
165
|
+
if (map && useSourceMap) {
|
|
166
|
+
map = (0, _utils.normalizeSourceMapAfterPostcss)(map, this.context);
|
|
167
|
+
}
|
|
168
|
+
let ast;
|
|
169
|
+
try {
|
|
170
|
+
ast = {
|
|
171
|
+
type: "postcss",
|
|
172
|
+
version: result.processor.version,
|
|
173
|
+
root: result.root,
|
|
174
|
+
};
|
|
175
|
+
} catch (error) {
|
|
176
|
+
(0, _utils.reportError)(this, callback, error);
|
|
177
|
+
return;
|
|
178
|
+
}
|
|
179
|
+
callback(null, result.css, map, { ast });
|
|
180
|
+
}
|
|
181
|
+
},
|
|
182
|
+
870: (module, exports, __nccwpck_require__) => {
|
|
183
|
+
module = __nccwpck_require__.nmd(module);
|
|
184
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
185
|
+
exports.exec = exec;
|
|
186
|
+
exports.findPackageJSONDir = findPackageJSONDir;
|
|
187
|
+
exports.getPostcssImplementation = getPostcssImplementation;
|
|
188
|
+
exports.getPostcssOptions = getPostcssOptions;
|
|
189
|
+
exports.loadConfig = loadConfig;
|
|
190
|
+
exports.normalizeSourceMap = normalizeSourceMap;
|
|
191
|
+
exports.normalizeSourceMapAfterPostcss = normalizeSourceMapAfterPostcss;
|
|
192
|
+
exports.reportError = reportError;
|
|
193
|
+
exports.warningFactory = warningFactory;
|
|
194
|
+
var _nodeModule = _interopRequireDefault(__nccwpck_require__(995));
|
|
195
|
+
var _nodePath = _interopRequireDefault(__nccwpck_require__(760));
|
|
196
|
+
var _nodeUrl = _interopRequireDefault(__nccwpck_require__(136));
|
|
197
|
+
var _cosmiconfig = {};
|
|
198
|
+
function _interopRequireDefault(e) {
|
|
199
|
+
return e && e.__esModule ? e : { default: e };
|
|
200
|
+
}
|
|
201
|
+
const parentModule = module;
|
|
202
|
+
const stat = (inputFileSystem, filePath) =>
|
|
203
|
+
new Promise((resolve, reject) => {
|
|
204
|
+
inputFileSystem.stat(filePath, (err, stats) => {
|
|
205
|
+
if (err) {
|
|
206
|
+
reject(err);
|
|
207
|
+
}
|
|
208
|
+
resolve(stats);
|
|
209
|
+
});
|
|
210
|
+
});
|
|
211
|
+
function exec(code, loaderContext) {
|
|
212
|
+
const { resource, context } = loaderContext;
|
|
213
|
+
const module = new _nodeModule.default(resource, parentModule);
|
|
214
|
+
module.paths = _nodeModule.default._nodeModulePaths(context);
|
|
215
|
+
module.filename = resource;
|
|
216
|
+
module._compile(code, resource);
|
|
217
|
+
return module.exports;
|
|
218
|
+
}
|
|
219
|
+
let tsLoader;
|
|
220
|
+
async function loadConfig(loaderContext, config, postcssOptions) {
|
|
221
|
+
const searchPath =
|
|
222
|
+
typeof config === "string"
|
|
223
|
+
? _nodePath.default.resolve(config)
|
|
224
|
+
: _nodePath.default.dirname(loaderContext.resourcePath);
|
|
225
|
+
let stats;
|
|
226
|
+
try {
|
|
227
|
+
stats = await stat(loaderContext.fs, searchPath);
|
|
228
|
+
} catch {
|
|
229
|
+
throw new Error(`No PostCSS config found in: ${searchPath}`);
|
|
230
|
+
}
|
|
231
|
+
const moduleName = "postcss";
|
|
232
|
+
const searchPlaces = [
|
|
233
|
+
"package.json",
|
|
234
|
+
`${moduleName}.config.js`,
|
|
235
|
+
`${moduleName}.config.mjs`,
|
|
236
|
+
`${moduleName}.config.cjs`,
|
|
237
|
+
`${moduleName}.config.ts`,
|
|
238
|
+
`${moduleName}.config.mts`,
|
|
239
|
+
`${moduleName}.config.cts`,
|
|
240
|
+
`.${moduleName}rc`,
|
|
241
|
+
`.${moduleName}rc.json`,
|
|
242
|
+
`.${moduleName}rc.js`,
|
|
243
|
+
`.${moduleName}rc.mjs`,
|
|
244
|
+
`.${moduleName}rc.cjs`,
|
|
245
|
+
`.${moduleName}rc.ts`,
|
|
246
|
+
`.${moduleName}rc.mts`,
|
|
247
|
+
`.${moduleName}rc.cts`,
|
|
248
|
+
`.${moduleName}rc.yaml`,
|
|
249
|
+
`.${moduleName}rc.yml`,
|
|
250
|
+
`.config/${moduleName}rc`,
|
|
251
|
+
`.config/${moduleName}rc.json`,
|
|
252
|
+
`.config/${moduleName}rc.yaml`,
|
|
253
|
+
`.config/${moduleName}rc.yml`,
|
|
254
|
+
`.config/${moduleName}rc.js`,
|
|
255
|
+
`.config/${moduleName}rc.mjs`,
|
|
256
|
+
`.config/${moduleName}rc.cjs`,
|
|
257
|
+
`.config/${moduleName}rc.ts`,
|
|
258
|
+
`.config/${moduleName}rc.mts`,
|
|
259
|
+
`.config/${moduleName}rc.cts`,
|
|
260
|
+
];
|
|
261
|
+
const loaders = {
|
|
262
|
+
".js": async (...args) => {
|
|
263
|
+
let result;
|
|
264
|
+
try {
|
|
265
|
+
result = _cosmiconfig.defaultLoadersSync[".js"](...args);
|
|
266
|
+
} catch (error) {
|
|
267
|
+
let importESM;
|
|
268
|
+
try {
|
|
269
|
+
importESM = new Function("id", "return import(id);");
|
|
270
|
+
} catch {
|
|
271
|
+
importESM = null;
|
|
272
|
+
}
|
|
273
|
+
if (
|
|
274
|
+
error.code === "ERR_REQUIRE_ESM" &&
|
|
275
|
+
_nodeUrl.default.pathToFileURL &&
|
|
276
|
+
importESM
|
|
277
|
+
) {
|
|
278
|
+
const urlForConfig = _nodeUrl.default.pathToFileURL(args[0]);
|
|
279
|
+
result = await importESM(urlForConfig);
|
|
280
|
+
} else {
|
|
281
|
+
throw error;
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
if (result.default) {
|
|
285
|
+
return result.default;
|
|
286
|
+
}
|
|
287
|
+
return result;
|
|
288
|
+
},
|
|
289
|
+
".cjs": _cosmiconfig.defaultLoadersSync[".cjs"],
|
|
290
|
+
".mjs": async (...args) => {
|
|
291
|
+
let result;
|
|
292
|
+
let importESM;
|
|
293
|
+
try {
|
|
294
|
+
importESM = new Function("id", "return import(id);");
|
|
295
|
+
} catch {
|
|
296
|
+
importESM = null;
|
|
297
|
+
}
|
|
298
|
+
if (_nodeUrl.default.pathToFileURL && importESM) {
|
|
299
|
+
const urlForConfig = _nodeUrl.default.pathToFileURL(args[0]);
|
|
300
|
+
result = await importESM(urlForConfig);
|
|
301
|
+
} else {
|
|
302
|
+
throw new Error("ESM is not supported");
|
|
303
|
+
}
|
|
304
|
+
if (result.default) {
|
|
305
|
+
return result.default;
|
|
306
|
+
}
|
|
307
|
+
return result;
|
|
308
|
+
},
|
|
309
|
+
};
|
|
310
|
+
if (!tsLoader) {
|
|
311
|
+
const opts = { interopDefault: true };
|
|
312
|
+
const { createJiti } = __nccwpck_require__(966);
|
|
313
|
+
const jiti = createJiti(__filename, opts);
|
|
314
|
+
tsLoader = (filepath) => jiti.import(filepath, { default: true });
|
|
315
|
+
}
|
|
316
|
+
loaders[".cts"] = tsLoader;
|
|
317
|
+
loaders[".mts"] = tsLoader;
|
|
318
|
+
loaders[".ts"] = tsLoader;
|
|
319
|
+
const explorer = (0, _cosmiconfig.cosmiconfig)(moduleName, {
|
|
320
|
+
searchStrategy: "global",
|
|
321
|
+
searchPlaces,
|
|
322
|
+
loaders,
|
|
323
|
+
});
|
|
324
|
+
const result = await (stats.isFile()
|
|
325
|
+
? explorer.load(searchPath)
|
|
326
|
+
: explorer.search(searchPath));
|
|
327
|
+
if (!result) {
|
|
328
|
+
return {};
|
|
329
|
+
}
|
|
330
|
+
loaderContext.addBuildDependency(result.filepath);
|
|
331
|
+
loaderContext.addDependency(result.filepath);
|
|
332
|
+
if (result.isEmpty) {
|
|
333
|
+
return result;
|
|
334
|
+
}
|
|
335
|
+
if (typeof result.config === "function") {
|
|
336
|
+
const api = {
|
|
337
|
+
mode: loaderContext.mode,
|
|
338
|
+
file: loaderContext.resourcePath,
|
|
339
|
+
webpackLoaderContext: loaderContext,
|
|
340
|
+
env: loaderContext.mode,
|
|
341
|
+
options: postcssOptions || {},
|
|
342
|
+
};
|
|
343
|
+
return { ...result, config: result.config(api) };
|
|
344
|
+
}
|
|
345
|
+
return result;
|
|
346
|
+
}
|
|
347
|
+
function loadPlugin(plugin, options, file) {
|
|
348
|
+
try {
|
|
349
|
+
let loadedPlugin = require(plugin);
|
|
350
|
+
if (loadedPlugin.default) {
|
|
351
|
+
loadedPlugin = loadedPlugin.default;
|
|
352
|
+
}
|
|
353
|
+
if (!options || Object.keys(options).length === 0) {
|
|
354
|
+
return loadedPlugin;
|
|
355
|
+
}
|
|
356
|
+
return loadedPlugin(options);
|
|
357
|
+
} catch (error) {
|
|
358
|
+
throw new Error(
|
|
359
|
+
`Loading PostCSS "${plugin}" plugin failed: ${error.message}\n\n(@${file})`,
|
|
360
|
+
{ cause: error },
|
|
361
|
+
);
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
function pluginFactory() {
|
|
365
|
+
const listOfPlugins = new Map();
|
|
366
|
+
return (plugins) => {
|
|
367
|
+
if (typeof plugins === "undefined") {
|
|
368
|
+
return listOfPlugins;
|
|
369
|
+
}
|
|
370
|
+
if (Array.isArray(plugins)) {
|
|
371
|
+
for (const plugin of plugins) {
|
|
372
|
+
if (Array.isArray(plugin)) {
|
|
373
|
+
const [name, options] = plugin;
|
|
374
|
+
listOfPlugins.set(name, options);
|
|
375
|
+
} else if (plugin && typeof plugin === "function") {
|
|
376
|
+
listOfPlugins.set(plugin);
|
|
377
|
+
} else if (
|
|
378
|
+
plugin &&
|
|
379
|
+
Object.keys(plugin).length === 1 &&
|
|
380
|
+
(typeof plugin[Object.keys(plugin)[0]] === "object" ||
|
|
381
|
+
typeof plugin[Object.keys(plugin)[0]] === "boolean") &&
|
|
382
|
+
plugin[Object.keys(plugin)[0]] !== null
|
|
383
|
+
) {
|
|
384
|
+
const [name] = Object.keys(plugin);
|
|
385
|
+
const options = plugin[name];
|
|
386
|
+
if (options === false) {
|
|
387
|
+
listOfPlugins.delete(name);
|
|
388
|
+
} else {
|
|
389
|
+
listOfPlugins.set(name, options);
|
|
390
|
+
}
|
|
391
|
+
} else if (plugin) {
|
|
392
|
+
listOfPlugins.set(plugin);
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
} else {
|
|
396
|
+
const objectPlugins = Object.entries(plugins);
|
|
397
|
+
for (const [name, options] of objectPlugins) {
|
|
398
|
+
if (options === false) {
|
|
399
|
+
listOfPlugins.delete(name);
|
|
400
|
+
} else {
|
|
401
|
+
listOfPlugins.set(name, options);
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
return listOfPlugins;
|
|
406
|
+
};
|
|
407
|
+
}
|
|
408
|
+
async function tryRequireThenImport(module) {
|
|
409
|
+
let exports;
|
|
410
|
+
try {
|
|
411
|
+
exports = require(module);
|
|
412
|
+
return exports;
|
|
413
|
+
} catch (err) {
|
|
414
|
+
let importESM;
|
|
415
|
+
try {
|
|
416
|
+
importESM = new Function("id", "return import(id);");
|
|
417
|
+
} catch {
|
|
418
|
+
importESM = null;
|
|
419
|
+
}
|
|
420
|
+
if (err.code === "ERR_REQUIRE_ESM" && importESM) {
|
|
421
|
+
exports = await importESM(module);
|
|
422
|
+
return exports.default;
|
|
423
|
+
}
|
|
424
|
+
throw err;
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
async function getPostcssOptions(
|
|
428
|
+
loaderContext,
|
|
429
|
+
loadedConfig = {},
|
|
430
|
+
postcssOptions = {},
|
|
431
|
+
) {
|
|
432
|
+
const file = loaderContext.resourcePath;
|
|
433
|
+
let normalizedPostcssOptions = postcssOptions;
|
|
434
|
+
if (typeof normalizedPostcssOptions === "function") {
|
|
435
|
+
normalizedPostcssOptions = normalizedPostcssOptions(loaderContext);
|
|
436
|
+
}
|
|
437
|
+
let plugins = [];
|
|
438
|
+
try {
|
|
439
|
+
const factory = pluginFactory();
|
|
440
|
+
if (loadedConfig.config && loadedConfig.config.plugins) {
|
|
441
|
+
factory(loadedConfig.config.plugins);
|
|
442
|
+
}
|
|
443
|
+
factory(normalizedPostcssOptions.plugins);
|
|
444
|
+
plugins = [...factory()].map((item) => {
|
|
445
|
+
const [plugin, options] = item;
|
|
446
|
+
if (typeof plugin === "string") {
|
|
447
|
+
return loadPlugin(plugin, options, file);
|
|
448
|
+
}
|
|
449
|
+
return plugin;
|
|
450
|
+
});
|
|
451
|
+
} catch (error) {
|
|
452
|
+
loaderContext.emitError(error);
|
|
453
|
+
}
|
|
454
|
+
const processOptionsFromConfig = { ...loadedConfig.config };
|
|
455
|
+
if (processOptionsFromConfig.from) {
|
|
456
|
+
processOptionsFromConfig.from = _nodePath.default.resolve(
|
|
457
|
+
_nodePath.default.dirname(loadedConfig.filepath),
|
|
458
|
+
processOptionsFromConfig.from,
|
|
459
|
+
);
|
|
460
|
+
}
|
|
461
|
+
if (processOptionsFromConfig.to) {
|
|
462
|
+
processOptionsFromConfig.to = _nodePath.default.resolve(
|
|
463
|
+
_nodePath.default.dirname(loadedConfig.filepath),
|
|
464
|
+
processOptionsFromConfig.to,
|
|
465
|
+
);
|
|
466
|
+
}
|
|
467
|
+
const processOptionsFromOptions = { ...normalizedPostcssOptions };
|
|
468
|
+
if (processOptionsFromOptions.from) {
|
|
469
|
+
processOptionsFromOptions.from = _nodePath.default.resolve(
|
|
470
|
+
loaderContext.rootContext,
|
|
471
|
+
processOptionsFromOptions.from,
|
|
472
|
+
);
|
|
473
|
+
}
|
|
474
|
+
if (processOptionsFromOptions.to) {
|
|
475
|
+
processOptionsFromOptions.to = _nodePath.default.resolve(
|
|
476
|
+
loaderContext.rootContext,
|
|
477
|
+
processOptionsFromOptions.to,
|
|
478
|
+
);
|
|
479
|
+
}
|
|
480
|
+
const { plugins: __plugins, ...optionsFromConfig } =
|
|
481
|
+
processOptionsFromConfig;
|
|
482
|
+
const {
|
|
483
|
+
config: _config,
|
|
484
|
+
plugins: _plugins,
|
|
485
|
+
...optionsFromOptions
|
|
486
|
+
} = processOptionsFromOptions;
|
|
487
|
+
const processOptions = {
|
|
488
|
+
from: file,
|
|
489
|
+
to: file,
|
|
490
|
+
map: false,
|
|
491
|
+
...optionsFromConfig,
|
|
492
|
+
...optionsFromOptions,
|
|
493
|
+
};
|
|
494
|
+
if (typeof processOptions.parser === "string") {
|
|
495
|
+
try {
|
|
496
|
+
processOptions.parser = await tryRequireThenImport(
|
|
497
|
+
processOptions.parser,
|
|
498
|
+
);
|
|
499
|
+
} catch (error) {
|
|
500
|
+
loaderContext.emitError(
|
|
501
|
+
new Error(
|
|
502
|
+
`Loading PostCSS "${processOptions.parser}" parser failed: ${error.message}\n\n(@${file})`,
|
|
503
|
+
),
|
|
504
|
+
);
|
|
505
|
+
}
|
|
506
|
+
}
|
|
507
|
+
if (typeof processOptions.stringifier === "string") {
|
|
508
|
+
try {
|
|
509
|
+
processOptions.stringifier = await tryRequireThenImport(
|
|
510
|
+
processOptions.stringifier,
|
|
511
|
+
);
|
|
512
|
+
} catch (error) {
|
|
513
|
+
loaderContext.emitError(
|
|
514
|
+
new Error(
|
|
515
|
+
`Loading PostCSS "${processOptions.stringifier}" stringifier failed: ${error.message}\n\n(@${file})`,
|
|
516
|
+
),
|
|
517
|
+
);
|
|
518
|
+
}
|
|
519
|
+
}
|
|
520
|
+
if (typeof processOptions.syntax === "string") {
|
|
521
|
+
try {
|
|
522
|
+
processOptions.syntax = await tryRequireThenImport(
|
|
523
|
+
processOptions.syntax,
|
|
524
|
+
);
|
|
525
|
+
} catch (error) {
|
|
526
|
+
loaderContext.emitError(
|
|
527
|
+
new Error(
|
|
528
|
+
`Loading PostCSS "${processOptions.syntax}" syntax failed: ${error.message}\n\n(@${file})`,
|
|
529
|
+
),
|
|
530
|
+
);
|
|
531
|
+
}
|
|
532
|
+
}
|
|
533
|
+
if (processOptions.map === true) {
|
|
534
|
+
processOptions.map = { inline: true };
|
|
535
|
+
}
|
|
536
|
+
return { plugins, processOptions };
|
|
537
|
+
}
|
|
538
|
+
const IS_NATIVE_WIN32_PATH = /^[a-z]:[/\\]|^\\\\/i;
|
|
539
|
+
const ABSOLUTE_SCHEME = /^[a-z0-9+\-.]+:/i;
|
|
540
|
+
function getURLType(source) {
|
|
541
|
+
if (source[0] === "/") {
|
|
542
|
+
if (source[1] === "/") {
|
|
543
|
+
return "scheme-relative";
|
|
544
|
+
}
|
|
545
|
+
return "path-absolute";
|
|
546
|
+
}
|
|
547
|
+
if (IS_NATIVE_WIN32_PATH.test(source)) {
|
|
548
|
+
return "path-absolute";
|
|
549
|
+
}
|
|
550
|
+
return ABSOLUTE_SCHEME.test(source) ? "absolute" : "path-relative";
|
|
551
|
+
}
|
|
552
|
+
function normalizeSourceMap(map, resourceContext) {
|
|
553
|
+
let newMap = map;
|
|
554
|
+
if (typeof newMap === "string") {
|
|
555
|
+
newMap = JSON.parse(newMap);
|
|
556
|
+
}
|
|
557
|
+
delete newMap.file;
|
|
558
|
+
const { sourceRoot } = newMap;
|
|
559
|
+
delete newMap.sourceRoot;
|
|
560
|
+
if (newMap.sources) {
|
|
561
|
+
newMap.sources = newMap.sources.map((source) => {
|
|
562
|
+
const sourceType = getURLType(source);
|
|
563
|
+
if (
|
|
564
|
+
sourceType === "path-relative" ||
|
|
565
|
+
sourceType === "path-absolute"
|
|
566
|
+
) {
|
|
567
|
+
const absoluteSource =
|
|
568
|
+
sourceType === "path-relative" && sourceRoot
|
|
569
|
+
? _nodePath.default.resolve(
|
|
570
|
+
sourceRoot,
|
|
571
|
+
_nodePath.default.normalize(source),
|
|
572
|
+
)
|
|
573
|
+
: _nodePath.default.normalize(source);
|
|
574
|
+
return _nodePath.default.relative(
|
|
575
|
+
resourceContext,
|
|
576
|
+
absoluteSource,
|
|
577
|
+
);
|
|
578
|
+
}
|
|
579
|
+
return source;
|
|
580
|
+
});
|
|
581
|
+
}
|
|
582
|
+
return newMap;
|
|
583
|
+
}
|
|
584
|
+
function normalizeSourceMapAfterPostcss(map, resourceContext) {
|
|
585
|
+
const newMap = map;
|
|
586
|
+
delete newMap.file;
|
|
587
|
+
newMap.sourceRoot = "";
|
|
588
|
+
newMap.sources = newMap.sources.map((source) => {
|
|
589
|
+
if (source.indexOf("<") === 0) {
|
|
590
|
+
return source;
|
|
591
|
+
}
|
|
592
|
+
const sourceType = getURLType(source);
|
|
593
|
+
if (sourceType === "path-relative") {
|
|
594
|
+
return _nodePath.default.resolve(resourceContext, source);
|
|
595
|
+
}
|
|
596
|
+
return source;
|
|
597
|
+
});
|
|
598
|
+
return newMap;
|
|
599
|
+
}
|
|
600
|
+
function findPackageJSONDir(cwd, statSync) {
|
|
601
|
+
let dir = cwd;
|
|
602
|
+
for (;;) {
|
|
603
|
+
try {
|
|
604
|
+
if (
|
|
605
|
+
statSync(_nodePath.default.join(dir, "package.json")).isFile()
|
|
606
|
+
) {
|
|
607
|
+
break;
|
|
608
|
+
}
|
|
609
|
+
} catch {}
|
|
610
|
+
const parent = _nodePath.default.dirname(dir);
|
|
611
|
+
if (dir === parent) {
|
|
612
|
+
dir = null;
|
|
613
|
+
break;
|
|
614
|
+
}
|
|
615
|
+
dir = parent;
|
|
616
|
+
}
|
|
617
|
+
return dir;
|
|
618
|
+
}
|
|
619
|
+
function getPostcssImplementation(loaderContext, implementation) {
|
|
620
|
+
let resolvedImplementation = implementation;
|
|
621
|
+
if (!implementation || typeof implementation === "string") {
|
|
622
|
+
const postcssImplPkg = implementation || "postcss";
|
|
623
|
+
resolvedImplementation = require(postcssImplPkg);
|
|
624
|
+
}
|
|
625
|
+
return resolvedImplementation;
|
|
626
|
+
}
|
|
627
|
+
function syntaxErrorFactory(error) {
|
|
628
|
+
let message = "\nSyntaxError\n\n";
|
|
629
|
+
if (typeof error.line !== "undefined") {
|
|
630
|
+
message += `(${error.line}:${error.column}) `;
|
|
631
|
+
}
|
|
632
|
+
if (typeof error.plugin !== "undefined") {
|
|
633
|
+
message += `from "${error.plugin}" plugin: `;
|
|
634
|
+
}
|
|
635
|
+
message += error.file ? `${error.file} ` : "<css input> ";
|
|
636
|
+
message += `${error.reason}`;
|
|
637
|
+
const code = error.showSourceCode();
|
|
638
|
+
if (code) {
|
|
639
|
+
message += `\n\n${code}\n`;
|
|
640
|
+
}
|
|
641
|
+
const obj = new Error(message, { cause: error });
|
|
642
|
+
obj.stack = null;
|
|
643
|
+
return obj;
|
|
644
|
+
}
|
|
645
|
+
function reportError(loaderContext, callback, error) {
|
|
646
|
+
if (error.file) {
|
|
647
|
+
loaderContext.addDependency(error.file);
|
|
648
|
+
}
|
|
649
|
+
if (error.name === "CssSyntaxError") {
|
|
650
|
+
callback(syntaxErrorFactory(error));
|
|
651
|
+
} else {
|
|
652
|
+
callback(error);
|
|
653
|
+
}
|
|
654
|
+
}
|
|
655
|
+
function warningFactory(warning) {
|
|
656
|
+
let message = "";
|
|
657
|
+
if (typeof warning.line !== "undefined") {
|
|
658
|
+
message += `(${warning.line}:${warning.column}) `;
|
|
659
|
+
}
|
|
660
|
+
if (typeof warning.plugin !== "undefined") {
|
|
661
|
+
message += `from "${warning.plugin}" plugin: `;
|
|
662
|
+
}
|
|
663
|
+
message += warning.text;
|
|
664
|
+
if (warning.node) {
|
|
665
|
+
message += `\n\nCode:\n ${warning.node.toString()}\n`;
|
|
666
|
+
}
|
|
667
|
+
const obj = new Error(message, { cause: warning });
|
|
668
|
+
obj.stack = null;
|
|
669
|
+
return obj;
|
|
670
|
+
}
|
|
671
|
+
},
|
|
672
|
+
966: (module) => {
|
|
673
|
+
module.exports = require("../jiti");
|
|
674
|
+
},
|
|
675
|
+
995: (module) => {
|
|
676
|
+
module.exports = require("node:module");
|
|
677
|
+
},
|
|
678
|
+
760: (module) => {
|
|
679
|
+
module.exports = require("node:path");
|
|
680
|
+
},
|
|
681
|
+
136: (module) => {
|
|
682
|
+
module.exports = require("node:url");
|
|
683
|
+
},
|
|
684
|
+
};
|
|
685
|
+
var __webpack_module_cache__ = {};
|
|
686
|
+
function __nccwpck_require__(moduleId) {
|
|
687
|
+
var cachedModule = __webpack_module_cache__[moduleId];
|
|
688
|
+
if (cachedModule !== undefined) {
|
|
689
|
+
return cachedModule.exports;
|
|
690
|
+
}
|
|
691
|
+
var module = (__webpack_module_cache__[moduleId] = {
|
|
692
|
+
id: moduleId,
|
|
693
|
+
loaded: false,
|
|
694
|
+
exports: {},
|
|
695
|
+
});
|
|
696
|
+
var threw = true;
|
|
697
|
+
try {
|
|
698
|
+
__webpack_modules__[moduleId](
|
|
699
|
+
module,
|
|
700
|
+
module.exports,
|
|
701
|
+
__nccwpck_require__,
|
|
702
|
+
);
|
|
703
|
+
threw = false;
|
|
704
|
+
} finally {
|
|
705
|
+
if (threw) delete __webpack_module_cache__[moduleId];
|
|
706
|
+
}
|
|
707
|
+
module.loaded = true;
|
|
708
|
+
return module.exports;
|
|
709
|
+
}
|
|
710
|
+
(() => {
|
|
711
|
+
__nccwpck_require__.nmd = (module) => {
|
|
712
|
+
module.paths = [];
|
|
713
|
+
if (!module.children) module.children = [];
|
|
714
|
+
return module;
|
|
715
|
+
};
|
|
716
|
+
})();
|
|
717
|
+
if (typeof __nccwpck_require__ !== "undefined")
|
|
718
|
+
__nccwpck_require__.ab = __dirname + "/";
|
|
719
|
+
var __webpack_exports__ = __nccwpck_require__(841);
|
|
720
|
+
module.exports = __webpack_exports__;
|
|
721
|
+
})();
|