@rspack-canary/core 1.7.4-canary-e31ee70c-20260121175734 → 2.0.0-canary-30d58971-20260122174325
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/dist/ChunkGraph.d.ts +1 -1
- package/dist/Compilation.d.ts +27 -27
- package/dist/Compiler.d.ts +19 -17
- package/dist/ContextModuleFactory.d.ts +1 -1
- package/dist/Diagnostics.d.ts +1 -1
- package/dist/ExecuteModulePlugin.d.ts +1 -1
- package/dist/ExportsInfo.d.ts +1 -1
- package/dist/FileSystem.d.ts +1 -1
- package/dist/Module.d.ts +2 -2
- package/dist/ModuleGraph.d.ts +2 -2
- package/dist/MultiCompiler.d.ts +7 -7
- package/dist/MultiStats.d.ts +3 -3
- package/dist/MultiWatching.d.ts +2 -2
- package/dist/NativeWatchFileSystem.d.ts +1 -1
- package/dist/NormalModule.d.ts +3 -3
- package/dist/NormalModuleFactory.d.ts +3 -3
- package/dist/Resolver.d.ts +1 -1
- package/dist/ResolverFactory.d.ts +2 -2
- package/dist/RuntimeGlobals.d.ts +2 -2
- package/dist/RuntimeModule.d.ts +3 -3
- package/dist/Stats.d.ts +4 -4
- package/dist/VirtualModulesPlugin.d.ts +1 -1
- package/dist/Watching.d.ts +4 -4
- package/dist/builtin-loader/lightningcss/index.d.ts +11 -14
- package/dist/builtin-loader/lightningcss/target.d.ts +4 -0
- package/dist/builtin-loader/swc/index.d.ts +5 -5
- package/dist/builtin-loader/swc/types.d.ts +2 -8
- package/dist/builtin-plugin/APIPlugin.d.ts +3 -3
- package/dist/builtin-plugin/ArrayPushCallbackChunkFormatPlugin.d.ts +3 -3
- package/dist/builtin-plugin/AssetModulesPlugin.d.ts +3 -3
- package/dist/builtin-plugin/AsyncWebAssemblyModulesPlugin.d.ts +3 -3
- package/dist/builtin-plugin/BannerPlugin.d.ts +3 -3
- package/dist/builtin-plugin/BundlerInfoRspackPlugin.d.ts +3 -3
- package/dist/builtin-plugin/CaseSensitivePlugin.d.ts +3 -3
- package/dist/builtin-plugin/ChunkPrefetchPreloadPlugin.d.ts +3 -3
- package/dist/builtin-plugin/CircularDependencyRspackPlugin.d.ts +4 -4
- package/dist/builtin-plugin/CommonJsChunkFormatPlugin.d.ts +3 -3
- package/dist/builtin-plugin/ContextReplacementPlugin.d.ts +3 -3
- package/dist/builtin-plugin/CopyRspackPlugin.d.ts +3 -3
- package/dist/builtin-plugin/CssChunkingPlugin.d.ts +3 -3
- package/dist/builtin-plugin/CssModulesPlugin.d.ts +3 -3
- package/dist/builtin-plugin/DataUriPlugin.d.ts +3 -3
- package/dist/builtin-plugin/DefinePlugin.d.ts +3 -3
- package/dist/builtin-plugin/DeterministicChunkIdsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/DeterministicModuleIdsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/DllEntryPlugin.d.ts +3 -3
- package/dist/builtin-plugin/DllReferenceAgencyPlugin.d.ts +3 -3
- package/dist/builtin-plugin/DynamicEntryPlugin.d.ts +3 -3
- package/dist/builtin-plugin/ElectronTargetPlugin.d.ts +3 -3
- package/dist/builtin-plugin/EnableChunkLoadingPlugin.d.ts +2 -2
- package/dist/builtin-plugin/EnableLibraryPlugin.d.ts +2 -2
- package/dist/builtin-plugin/EnableWasmLoadingPlugin.d.ts +3 -3
- package/dist/builtin-plugin/EnsureChunkConditionsPlugin.d.ts +3 -3
- package/dist/builtin-plugin/EntryPlugin.d.ts +4 -4
- package/dist/builtin-plugin/EsmLibraryPlugin.d.ts +3 -1
- package/dist/builtin-plugin/EvalDevToolModulePlugin.d.ts +3 -3
- package/dist/builtin-plugin/EvalSourceMapDevToolPlugin.d.ts +3 -3
- package/dist/builtin-plugin/ExternalsPlugin.d.ts +2 -2
- package/dist/builtin-plugin/FetchCompileAsyncWasmPlugin.d.ts +3 -3
- package/dist/builtin-plugin/FileUriPlugin.d.ts +3 -3
- package/dist/builtin-plugin/FlagAllModulesAsUsedPlugin.d.ts +3 -3
- package/dist/builtin-plugin/FlagDependencyExportsPlugin.d.ts +3 -3
- package/dist/builtin-plugin/FlagDependencyUsagePlugin.d.ts +1 -1
- package/dist/builtin-plugin/HotModuleReplacementPlugin.d.ts +2 -2
- package/dist/builtin-plugin/HttpExternalsRspackPlugin.d.ts +3 -3
- package/dist/builtin-plugin/HttpUriPlugin.d.ts +2 -2
- package/dist/builtin-plugin/IgnorePlugin.d.ts +3 -3
- package/dist/builtin-plugin/InferAsyncModulesPlugin.d.ts +3 -3
- package/dist/builtin-plugin/InlineExportsPlugin.d.ts +3 -3
- package/dist/builtin-plugin/JavascriptModulesPlugin.d.ts +4 -4
- package/dist/builtin-plugin/JsLoaderRspackPlugin.d.ts +2 -2
- package/dist/builtin-plugin/JsonModulesPlugin.d.ts +3 -3
- package/dist/builtin-plugin/LibManifestPlugin.d.ts +3 -3
- package/dist/builtin-plugin/LightningCssMinimizerRspackPlugin.d.ts +7 -11
- package/dist/builtin-plugin/LimitChunkCountPlugin.d.ts +3 -3
- package/dist/builtin-plugin/MangleExportsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/MergeDuplicateChunksPlugin.d.ts +3 -3
- package/dist/builtin-plugin/ModuleChunkFormatPlugin.d.ts +3 -3
- package/dist/builtin-plugin/ModuleConcatenationPlugin.d.ts +1 -1
- package/dist/builtin-plugin/ModuleInfoHeaderPlugin.d.ts +3 -3
- package/dist/builtin-plugin/NamedChunkIdsPlugin.d.ts +3 -3
- package/dist/builtin-plugin/NamedModuleIdsPlugin.d.ts +3 -3
- package/dist/builtin-plugin/NaturalChunkIdsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/NaturalModuleIdsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/NoEmitOnErrorsPlugin.d.ts +3 -3
- package/dist/builtin-plugin/NodeTargetPlugin.d.ts +3 -3
- package/dist/builtin-plugin/NormalModuleReplacementPlugin.d.ts +4 -4
- package/dist/builtin-plugin/OccurrenceChunkIdsPlugin.d.ts +3 -3
- package/dist/builtin-plugin/ProgressPlugin.d.ts +3 -3
- package/dist/builtin-plugin/ProvidePlugin.d.ts +3 -3
- package/dist/builtin-plugin/RealContentHashPlugin.d.ts +3 -3
- package/dist/builtin-plugin/RemoveDuplicateModulesPlugin.d.ts +3 -3
- package/dist/builtin-plugin/RemoveEmptyChunksPlugin.d.ts +3 -3
- package/dist/builtin-plugin/RsdoctorPlugin.d.ts +4 -8
- package/dist/builtin-plugin/RslibPlugin.d.ts +3 -3
- package/dist/builtin-plugin/RstestPlugin.d.ts +3 -3
- package/dist/builtin-plugin/RuntimeChunkPlugin.d.ts +3 -3
- package/dist/builtin-plugin/RuntimePlugin.d.ts +6 -10
- package/dist/builtin-plugin/SideEffectsFlagPlugin.d.ts +3 -3
- package/dist/builtin-plugin/SizeLimitsPlugin.d.ts +3 -3
- package/dist/builtin-plugin/SourceMapDevToolPlugin.d.ts +3 -3
- package/dist/builtin-plugin/SplitChunksPlugin.d.ts +3 -3
- package/dist/builtin-plugin/SubresourceIntegrityPlugin.d.ts +2 -2
- package/dist/builtin-plugin/SwcJsMinimizerPlugin.d.ts +6 -5
- package/dist/builtin-plugin/URLPlugin.d.ts +3 -3
- package/dist/builtin-plugin/WebWorkerTemplatePlugin.d.ts +2 -2
- package/dist/builtin-plugin/WorkerPlugin.d.ts +3 -3
- package/dist/builtin-plugin/base.d.ts +3 -3
- package/dist/builtin-plugin/css-extract/index.d.ts +3 -3
- package/dist/builtin-plugin/css-extract/loader.d.ts +1 -1
- package/dist/builtin-plugin/css-extract/utils.d.ts +1 -1
- package/dist/builtin-plugin/html-plugin/hooks.d.ts +2 -2
- package/dist/builtin-plugin/html-plugin/index.d.ts +2 -2
- package/dist/builtin-plugin/html-plugin/options.d.ts +1 -6
- package/dist/builtin-plugin/html-plugin/plugin.d.ts +5 -9
- package/dist/builtin-plugin/html-plugin/taps.d.ts +1 -1
- package/dist/builtin-plugin/index.d.ts +84 -84
- package/dist/builtin-plugin/lazy-compilation/lazyCompilation.d.ts +4 -4
- package/dist/builtin-plugin/lazy-compilation/middleware.d.ts +2 -2
- package/dist/config/adapter.d.ts +4 -4
- package/dist/config/adapterRuleUse.d.ts +10 -9
- package/dist/config/browserslistTargetHandler.d.ts +1 -1
- package/dist/config/defaults.d.ts +5 -3
- package/dist/config/devServer.d.ts +3 -3
- package/dist/config/index.d.ts +5 -5
- package/dist/config/normalization.d.ts +8 -36
- package/dist/config/target.d.ts +14 -11
- package/dist/config/types.d.ts +94 -179
- package/dist/container/ContainerPlugin.d.ts +3 -3
- package/dist/container/ContainerReferencePlugin.d.ts +3 -3
- package/dist/container/ModuleFederationManifestPlugin.d.ts +2 -2
- package/dist/container/ModuleFederationPlugin.d.ts +4 -4
- package/dist/container/ModuleFederationPluginV1.d.ts +5 -5
- package/dist/container/ModuleFederationRuntimePlugin.d.ts +3 -3
- package/dist/container/index.d.ts +4 -4
- package/dist/cssExtractHmr.js +2 -27
- package/dist/cssExtractLoader.js +18 -60
- package/dist/exports.d.ts +69 -82
- package/dist/index.d.ts +3 -3
- package/dist/index.js +11674 -11739
- package/dist/lib/AbstractMethodError.d.ts +1 -1
- package/dist/lib/Cache.d.ts +1 -1
- package/dist/lib/CacheFacade.d.ts +3 -3
- package/dist/lib/DllPlugin.d.ts +2 -2
- package/dist/lib/DllReferencePlugin.d.ts +3 -3
- package/dist/lib/EntryOptionPlugin.d.ts +2 -2
- package/dist/lib/EnvironmentPlugin.d.ts +1 -1
- package/dist/lib/HookWebpackError.d.ts +1 -1
- package/dist/lib/IgnoreWarningsPlugin.d.ts +1 -1
- package/dist/lib/LoaderOptionsPlugin.d.ts +2 -2
- package/dist/lib/LoaderTargetPlugin.d.ts +2 -2
- package/dist/lib/WebpackError.d.ts +2 -2
- package/dist/lib/cache/MemoryCachePlugin.d.ts +1 -1
- package/dist/lib/cache/getLazyHashedEtag.d.ts +1 -1
- package/dist/lib/cache/mergeEtags.d.ts +1 -1
- package/dist/loader-runner/ModuleError.d.ts +1 -1
- package/dist/loader-runner/index.d.ts +1 -1
- package/dist/loader-runner/loadLoader.d.ts +2 -2
- package/dist/loader-runner/utils.d.ts +3 -3
- package/dist/loader-runner/worker.d.ts +1 -1
- package/dist/logging/createConsoleLogger.d.ts +2 -2
- package/dist/moduleFederationDefaultRuntime.js +1 -1
- package/dist/node/NodeEnvironmentPlugin.d.ts +2 -2
- package/dist/node/NodeTemplatePlugin.d.ts +1 -1
- package/dist/node/NodeWatchFileSystem.d.ts +1 -1
- package/dist/node/nodeConsole.d.ts +1 -1
- package/dist/rslib-runtime.js +29 -0
- package/dist/rspack.d.ts +5 -5
- package/dist/rspackOptionsApply.d.ts +1 -1
- package/dist/runtime/moduleFederationDefaultRuntime.d.ts +1 -2
- package/dist/sharing/ConsumeSharedPlugin.d.ts +2 -2
- package/dist/sharing/ProvideSharedPlugin.d.ts +2 -2
- package/dist/sharing/SharePlugin.d.ts +1 -1
- package/dist/sharing/ShareRuntimePlugin.d.ts +2 -2
- package/dist/stats/DefaultStatsFactoryPlugin.d.ts +1 -1
- package/dist/stats/DefaultStatsPresetPlugin.d.ts +1 -1
- package/dist/stats/DefaultStatsPrinterPlugin.d.ts +1 -1
- package/dist/stats/StatsFactory.d.ts +2 -2
- package/dist/stats/StatsPrinter.d.ts +1 -1
- package/dist/stats/statsFactoryUtils.d.ts +3 -6
- package/dist/taps/compilation.d.ts +1 -1
- package/dist/taps/compiler.d.ts +1 -1
- package/dist/taps/contextModuleFactory.d.ts +1 -1
- package/dist/taps/index.d.ts +6 -6
- package/dist/taps/javascriptModules.d.ts +1 -1
- package/dist/taps/normalModuleFactory.d.ts +1 -1
- package/dist/taps/types.d.ts +1 -1
- package/dist/trace/traceHookPlugin.d.ts +1 -1
- package/dist/util/createHash.d.ts +1 -1
- package/dist/util/fs.d.ts +1 -1
- package/dist/util/hash/md4.d.ts +1 -1
- package/dist/util/hash/xxhash64.d.ts +1 -1
- package/dist/util/index.d.ts +1 -1
- package/dist/util/targetsVersion.d.ts +2 -0
- package/dist/util/validateConfig.d.ts +1 -1
- package/dist/worker.js +846 -918
- package/hot/dev-server.js +12 -9
- package/hot/emitter.js +5 -1
- package/hot/lazy-compilation-node.js +4 -1
- package/hot/lazy-compilation-web.js +2 -3
- package/hot/log-apply-result.js +8 -5
- package/hot/log.js +17 -7
- package/hot/only-dev-server.js +13 -10
- package/hot/poll.js +11 -8
- package/hot/signal.js +13 -9
- package/package.json +10 -6
- package/compiled/browserslist-load-config/index.d.ts +0 -21
- package/compiled/browserslist-load-config/index.js +0 -252
- package/compiled/browserslist-load-config/license +0 -21
- package/compiled/browserslist-load-config/package.json +0 -1
- package/dist/builtin-loader/index.d.ts +0 -1
|
@@ -1,252 +0,0 @@
|
|
|
1
|
-
/******/ (() => { // webpackBootstrap
|
|
2
|
-
/******/ "use strict";
|
|
3
|
-
/******/ var __webpack_modules__ = ({
|
|
4
|
-
|
|
5
|
-
/***/ 24:
|
|
6
|
-
/***/ ((module) => {
|
|
7
|
-
|
|
8
|
-
module.exports = require("node:fs");
|
|
9
|
-
|
|
10
|
-
/***/ }),
|
|
11
|
-
|
|
12
|
-
/***/ 760:
|
|
13
|
-
/***/ ((module) => {
|
|
14
|
-
|
|
15
|
-
module.exports = require("node:path");
|
|
16
|
-
|
|
17
|
-
/***/ }),
|
|
18
|
-
|
|
19
|
-
/***/ 867:
|
|
20
|
-
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
var __nested_webpack_require_18__ = {};
|
|
24
|
-
(()=>{
|
|
25
|
-
__nested_webpack_require_18__.n = (module)=>{
|
|
26
|
-
var getter = module && module.__esModule ? ()=>module['default'] : ()=>module;
|
|
27
|
-
__nested_webpack_require_18__.d(getter, {
|
|
28
|
-
a: getter
|
|
29
|
-
});
|
|
30
|
-
return getter;
|
|
31
|
-
};
|
|
32
|
-
})();
|
|
33
|
-
(()=>{
|
|
34
|
-
__nested_webpack_require_18__.d = (exports1, definition)=>{
|
|
35
|
-
for(var key in definition)if (__nested_webpack_require_18__.o(definition, key) && !__nested_webpack_require_18__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
36
|
-
enumerable: true,
|
|
37
|
-
get: definition[key]
|
|
38
|
-
});
|
|
39
|
-
};
|
|
40
|
-
})();
|
|
41
|
-
(()=>{
|
|
42
|
-
__nested_webpack_require_18__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
43
|
-
})();
|
|
44
|
-
(()=>{
|
|
45
|
-
__nested_webpack_require_18__.r = (exports1)=>{
|
|
46
|
-
if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
47
|
-
value: 'Module'
|
|
48
|
-
});
|
|
49
|
-
Object.defineProperty(exports1, '__esModule', {
|
|
50
|
-
value: true
|
|
51
|
-
});
|
|
52
|
-
};
|
|
53
|
-
})();
|
|
54
|
-
var __nested_webpack_exports__ = {};
|
|
55
|
-
__nested_webpack_require_18__.r(__nested_webpack_exports__);
|
|
56
|
-
__nested_webpack_require_18__.d(__nested_webpack_exports__, {
|
|
57
|
-
loadConfig: ()=>loadConfig,
|
|
58
|
-
findConfig: ()=>findConfig
|
|
59
|
-
});
|
|
60
|
-
const external_node_fs_namespaceObject = __nccwpck_require__(24);
|
|
61
|
-
var external_node_fs_default = /*#__PURE__*/ __nested_webpack_require_18__.n(external_node_fs_namespaceObject);
|
|
62
|
-
const external_node_path_namespaceObject = __nccwpck_require__(760);
|
|
63
|
-
var external_node_path_default = /*#__PURE__*/ __nested_webpack_require_18__.n(external_node_path_namespaceObject);
|
|
64
|
-
function _define_property(obj, key, value) {
|
|
65
|
-
if (key in obj) Object.defineProperty(obj, key, {
|
|
66
|
-
value: value,
|
|
67
|
-
enumerable: true,
|
|
68
|
-
configurable: true,
|
|
69
|
-
writable: true
|
|
70
|
-
});
|
|
71
|
-
else obj[key] = value;
|
|
72
|
-
return obj;
|
|
73
|
-
}
|
|
74
|
-
class BrowserslistError extends Error {
|
|
75
|
-
constructor(message){
|
|
76
|
-
super(message), _define_property(this, "browserslist", void 0);
|
|
77
|
-
this.name = 'BrowserslistError';
|
|
78
|
-
this.browserslist = true;
|
|
79
|
-
if (Error.captureStackTrace) Error.captureStackTrace(this, BrowserslistError);
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
const isFileCache = {};
|
|
83
|
-
function isFile(file) {
|
|
84
|
-
if (file in isFileCache) return isFileCache[file];
|
|
85
|
-
const result = external_node_fs_default().existsSync(file) && external_node_fs_default().statSync(file).isFile();
|
|
86
|
-
isFileCache[file] = result;
|
|
87
|
-
return result;
|
|
88
|
-
}
|
|
89
|
-
function check(section) {
|
|
90
|
-
const FORMAT = 'Browserslist config should be a string or an array of strings with browser queries';
|
|
91
|
-
if (Array.isArray(section)) {
|
|
92
|
-
for(let i = 0; i < section.length; i++)if ('string' != typeof section[i]) throw new BrowserslistError(FORMAT);
|
|
93
|
-
} else if ('string' != typeof section) throw new BrowserslistError(FORMAT);
|
|
94
|
-
}
|
|
95
|
-
function parsePackage(file) {
|
|
96
|
-
const config = JSON.parse(external_node_fs_default().readFileSync(file).toString().replace(/^\uFEFF/m, ''));
|
|
97
|
-
if (config.browserlist && !config.browserslist) throw new BrowserslistError(`\`browserlist\` key instead of \`browserslist\` in ${file}`);
|
|
98
|
-
let list = config.browserslist;
|
|
99
|
-
if (Array.isArray(list)) list = {
|
|
100
|
-
defaults: list
|
|
101
|
-
};
|
|
102
|
-
if ('string' == typeof list) list = parseConfig(list);
|
|
103
|
-
for(const i in list)check(list[i]);
|
|
104
|
-
return list;
|
|
105
|
-
}
|
|
106
|
-
const IS_SECTION = /^\s*\[(.+)]\s*$/;
|
|
107
|
-
function parseConfig(string) {
|
|
108
|
-
const result = {
|
|
109
|
-
defaults: []
|
|
110
|
-
};
|
|
111
|
-
let sections = [
|
|
112
|
-
'defaults'
|
|
113
|
-
];
|
|
114
|
-
string.toString().replace(/#[^\n]*/g, '').split(/\n|,/).map((line)=>line.trim()).filter((line)=>'' !== line).forEach((line)=>{
|
|
115
|
-
const matched = line.match(IS_SECTION);
|
|
116
|
-
if (matched) {
|
|
117
|
-
sections = matched[1].trim().split(' ');
|
|
118
|
-
sections.forEach((section)=>{
|
|
119
|
-
if (result[section]) throw new BrowserslistError(`Duplicate section ${section} in Browserslist config`);
|
|
120
|
-
result[section] = [];
|
|
121
|
-
});
|
|
122
|
-
} else sections.forEach((section)=>{
|
|
123
|
-
result[section].push(line);
|
|
124
|
-
});
|
|
125
|
-
});
|
|
126
|
-
return result;
|
|
127
|
-
}
|
|
128
|
-
function readConfig(file) {
|
|
129
|
-
if (!isFile(file)) throw new BrowserslistError(`Can't read ${file} config`);
|
|
130
|
-
return parseConfig(external_node_fs_default().readFileSync(file, 'utf-8'));
|
|
131
|
-
}
|
|
132
|
-
function parsePackageOrReadConfig(file) {
|
|
133
|
-
if ('package.json' === external_node_path_default().basename(file)) return parsePackage(file);
|
|
134
|
-
return readConfig(file);
|
|
135
|
-
}
|
|
136
|
-
function pickEnv(config, opts) {
|
|
137
|
-
if ('object' != typeof config) return config;
|
|
138
|
-
let name;
|
|
139
|
-
name = 'string' == typeof opts.env ? opts.env : process.env.BROWSERSLIST_ENV ? process.env.BROWSERSLIST_ENV : process.env.NODE_ENV ? process.env.NODE_ENV : 'production';
|
|
140
|
-
return config[name] || config.defaults;
|
|
141
|
-
}
|
|
142
|
-
function eachParent(file, callback) {
|
|
143
|
-
const dir = isFile(file) ? external_node_path_default().dirname(file) : file;
|
|
144
|
-
let loc = external_node_path_default().resolve(dir);
|
|
145
|
-
do {
|
|
146
|
-
const result = callback(loc);
|
|
147
|
-
if (void 0 !== result) return result;
|
|
148
|
-
}while (loc !== (loc = external_node_path_default().dirname(loc)));
|
|
149
|
-
}
|
|
150
|
-
function findConfigFile(from) {
|
|
151
|
-
return eachParent(from, (dir)=>{
|
|
152
|
-
const config = external_node_path_default().join(dir, 'browserslist');
|
|
153
|
-
const pkg = external_node_path_default().join(dir, 'package.json');
|
|
154
|
-
const rc = external_node_path_default().join(dir, '.browserslistrc');
|
|
155
|
-
let pkgBrowserslist;
|
|
156
|
-
if (isFile(pkg)) try {
|
|
157
|
-
pkgBrowserslist = parsePackage(pkg);
|
|
158
|
-
} catch (e) {
|
|
159
|
-
if (e instanceof BrowserslistError) throw e;
|
|
160
|
-
console.warn(`[Browserslist] Could not parse ${pkg}. Ignoring it.`);
|
|
161
|
-
}
|
|
162
|
-
if (isFile(config) && pkgBrowserslist) throw new BrowserslistError(`${dir} contains both browserslist and package.json with browsers`);
|
|
163
|
-
if (isFile(rc) && pkgBrowserslist) throw new BrowserslistError(`${dir} contains both .browserslistrc and package.json with browsers`);
|
|
164
|
-
if (isFile(config) && isFile(rc)) throw new BrowserslistError(`${dir} contains both .browserslistrc and browserslist`);
|
|
165
|
-
if (isFile(config)) return config;
|
|
166
|
-
if (isFile(rc)) return rc;
|
|
167
|
-
if (pkgBrowserslist) return pkg;
|
|
168
|
-
});
|
|
169
|
-
}
|
|
170
|
-
const configCache = {};
|
|
171
|
-
function findConfig(from) {
|
|
172
|
-
from = external_node_path_default().resolve(from);
|
|
173
|
-
const fromDir = isFile(from) ? external_node_path_default().dirname(from) : from;
|
|
174
|
-
if (fromDir in configCache) return configCache[fromDir];
|
|
175
|
-
let resolved;
|
|
176
|
-
const configFile = findConfigFile(from);
|
|
177
|
-
if (configFile) resolved = parsePackageOrReadConfig(configFile);
|
|
178
|
-
const configDir = configFile && external_node_path_default().dirname(configFile);
|
|
179
|
-
eachParent(from, (dir)=>{
|
|
180
|
-
if (resolved) configCache[dir] = resolved;
|
|
181
|
-
if (dir === configDir) return null;
|
|
182
|
-
});
|
|
183
|
-
return resolved;
|
|
184
|
-
}
|
|
185
|
-
function loadConfig(opts) {
|
|
186
|
-
if (opts.config) return pickEnv(parsePackageOrReadConfig(opts.config), opts);
|
|
187
|
-
if (opts.path) {
|
|
188
|
-
const config = findConfig(opts.path);
|
|
189
|
-
if (!config) return;
|
|
190
|
-
return pickEnv(config, opts);
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
exports.findConfig = __nested_webpack_exports__.findConfig;
|
|
194
|
-
exports.loadConfig = __nested_webpack_exports__.loadConfig;
|
|
195
|
-
for(var __webpack_i__ in __nested_webpack_exports__)if (-1 === [
|
|
196
|
-
"findConfig",
|
|
197
|
-
"loadConfig"
|
|
198
|
-
].indexOf(__webpack_i__)) exports[__webpack_i__] = __nested_webpack_exports__[__webpack_i__];
|
|
199
|
-
Object.defineProperty(exports, "__esModule", ({
|
|
200
|
-
value: true
|
|
201
|
-
}));
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
/***/ })
|
|
205
|
-
|
|
206
|
-
/******/ });
|
|
207
|
-
/************************************************************************/
|
|
208
|
-
/******/ // The module cache
|
|
209
|
-
/******/ var __webpack_module_cache__ = {};
|
|
210
|
-
/******/
|
|
211
|
-
/******/ // The require function
|
|
212
|
-
/******/ function __nccwpck_require__(moduleId) {
|
|
213
|
-
/******/ // Check if module is in cache
|
|
214
|
-
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
|
215
|
-
/******/ if (cachedModule !== undefined) {
|
|
216
|
-
/******/ return cachedModule.exports;
|
|
217
|
-
/******/ }
|
|
218
|
-
/******/ // Create a new module (and put it into the cache)
|
|
219
|
-
/******/ var module = __webpack_module_cache__[moduleId] = {
|
|
220
|
-
/******/ // no module.id needed
|
|
221
|
-
/******/ // no module.loaded needed
|
|
222
|
-
/******/ exports: {}
|
|
223
|
-
/******/ };
|
|
224
|
-
/******/
|
|
225
|
-
/******/ // Execute the module function
|
|
226
|
-
/******/ var threw = true;
|
|
227
|
-
/******/ try {
|
|
228
|
-
/******/ __webpack_modules__[moduleId](module, module.exports, __nccwpck_require__);
|
|
229
|
-
/******/ threw = false;
|
|
230
|
-
/******/ } finally {
|
|
231
|
-
/******/ if(threw) delete __webpack_module_cache__[moduleId];
|
|
232
|
-
/******/ }
|
|
233
|
-
/******/
|
|
234
|
-
/******/ // Return the exports of the module
|
|
235
|
-
/******/ return module.exports;
|
|
236
|
-
/******/ }
|
|
237
|
-
/******/
|
|
238
|
-
/************************************************************************/
|
|
239
|
-
/******/ /* webpack/runtime/compat */
|
|
240
|
-
/******/
|
|
241
|
-
/******/ if (typeof __nccwpck_require__ !== 'undefined') __nccwpck_require__.ab = __dirname + "/";
|
|
242
|
-
/******/
|
|
243
|
-
/************************************************************************/
|
|
244
|
-
/******/
|
|
245
|
-
/******/ // startup
|
|
246
|
-
/******/ // Load entry module and return exports
|
|
247
|
-
/******/ // This entry module is referenced by other modules so it can't be inlined
|
|
248
|
-
/******/ var __webpack_exports__ = __nccwpck_require__(867);
|
|
249
|
-
/******/ module.exports = __webpack_exports__;
|
|
250
|
-
/******/
|
|
251
|
-
/******/ })()
|
|
252
|
-
;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2024 Rspack Contrib
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"name":"browserslist-load-config","version":"1.0.1","license":"MIT","types":"index.d.ts","type":"commonjs"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './swc';
|