@unpackjs/core 3.3.4 → 3.3.5
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/compiled/css-loader/index.js +339 -217
- package/compiled/launch-editor/index.js +21 -20
- package/compiled/launch-editor/package.json +1 -1
- package/compiled/less-loader/index.js +8 -8
- package/compiled/postcss-loader/index.js +194 -192
- package/compiled/sass-loader/index.js +142 -156
- package/compiled/sass-loader/package.json +1 -1
- package/compiled/semver/index.js +164 -164
- package/compiled/style-loader/index.js +10 -10
- package/compiled/webpack-bundle-analyzer/index.js +2 -2
- package/compiled/webpack-merge/index.js +29 -29
- package/dist/index.cjs +139 -168
- package/dist/index.js +92 -122
- package/dist-types/bundler-config/index.d.ts.map +1 -1
- package/dist-types/bundler-config/typeCheck.d.ts.map +1 -1
- package/package.json +7 -7
package/dist/index.js
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
let lastTrackTime, lastFileInfo, logger;
|
|
2
2
|
import __rslib_shim_module__ from 'module';
|
|
3
3
|
let require = __rslib_shim_module__.createRequire(import.meta.url);
|
|
4
|
-
import { fileURLToPath as __webpack_fileURLToPath__ } from "node:url";
|
|
5
|
-
import { dirname as __webpack_dirname__ } from "node:path";
|
|
6
4
|
import * as __WEBPACK_EXTERNAL_MODULE__compiled_launch_editor_index_js_29002383__ from "../compiled/launch-editor/index.js";
|
|
7
5
|
import * as __WEBPACK_EXTERNAL_MODULE__compiled_webpack_merge_index_js_efd91626__ from "../compiled/webpack-merge/index.js";
|
|
8
6
|
import { experiments, rspack } from "@rspack/core";
|
|
@@ -11,9 +9,7 @@ import node_readline from "node:readline";
|
|
|
11
9
|
import node_fs from "node:fs";
|
|
12
10
|
import node_net from "node:net";
|
|
13
11
|
import node_os, { platform } from "node:os";
|
|
14
|
-
import node_path, { join, sep } from "node:path";
|
|
15
12
|
import portfinder from "portfinder";
|
|
16
|
-
import { pathToFileURL } from "node:url";
|
|
17
13
|
import { expand } from "dotenv-expand";
|
|
18
14
|
import node_assert from "node:assert";
|
|
19
15
|
import { glob, globSync } from "tinyglobby";
|
|
@@ -66,7 +62,7 @@ let CSS_MODULES_LOCAL_IDENT_NAME = '[path][name]__[local]--[hash:5]', CSS_MODULE
|
|
|
66
62
|
jsAsync: 'js/async/[name].[contenthash:8].js',
|
|
67
63
|
css: 'css/[name].[contenthash:8].css',
|
|
68
64
|
cssAsync: 'css/async/[name].[contenthash:8].css'
|
|
69
|
-
}, EXPORT_LOCALS_CONVENTION = 'camel-case-only', TEMP_DIR = 'node_modules/.unpack', NODE_MODULES_REGEX = /[\\/]node_modules[\\/]/,
|
|
65
|
+
}, EXPORT_LOCALS_CONVENTION = 'camel-case-only', TEMP_DIR = 'node_modules/.unpack', NODE_MODULES_REGEX = /[\\/]node_modules[\\/]/, THREAD_OPTIONS = {
|
|
70
66
|
workers: 2
|
|
71
67
|
}, DEFAULT_DEV_HOST = '0.0.0.0', TEMPLATE_CONTENT = ({ title = '', headTag = '', mountId = '' })=>`<!DOCTYPE html>
|
|
72
68
|
<html lang="en">
|
|
@@ -319,8 +315,8 @@ async function setupCliShortcuts({ help = !0, openPage, closeServer, printUrls,
|
|
|
319
315
|
}
|
|
320
316
|
var config_filename = __webpack_fileURLToPath__(import.meta.url);
|
|
321
317
|
async function loadConfig({ cliOptions, command }) {
|
|
322
|
-
'build' === command ? setNodeEnv(
|
|
323
|
-
let root =
|
|
318
|
+
'build' === command ? setNodeEnv(cliOptions?.watch ? 'development' : 'production') : (setNodeEnv('development'), setDevServer(!0));
|
|
319
|
+
let root = cliOptions?.root ? node_path.resolve(cliOptions.root) : process.cwd(), configFilePath = resolveConfigPath(root, cliOptions?.config), configExport = {};
|
|
324
320
|
if (configFilePath) {
|
|
325
321
|
if (isNodeVersionAtLeast(22, 18) || /\.(?:js|mjs|cjs)$/.test(configFilePath)) {
|
|
326
322
|
logger_logger.debug('loading config file with native loader:', colors.dim(configFilePath));
|
|
@@ -356,18 +352,18 @@ async function loadConfig({ cliOptions, command }) {
|
|
|
356
352
|
if (void 0 === (configExport = await configExport(params))) throw Error('unpack config function must return a config object.');
|
|
357
353
|
}
|
|
358
354
|
}
|
|
359
|
-
return
|
|
355
|
+
return cliOptions?.port && setValueByPath(configExport, [
|
|
360
356
|
'server',
|
|
361
357
|
'port'
|
|
362
|
-
], cliOptions.port),
|
|
358
|
+
], cliOptions.port), cliOptions?.open && setValueByPath(configExport, [
|
|
363
359
|
'server',
|
|
364
360
|
'open'
|
|
365
|
-
], cliOptions.open),
|
|
361
|
+
], cliOptions.open), cliOptions?.analyze && setValueByPath(configExport, [
|
|
366
362
|
'performance',
|
|
367
363
|
'bundleAnalyze'
|
|
368
|
-
], cliOptions.analyze),
|
|
364
|
+
], cliOptions.analyze), cliOptions?.root && setValueByPath(configExport, [
|
|
369
365
|
'root'
|
|
370
|
-
], root),
|
|
366
|
+
], root), cliOptions?.host && setValueByPath(configExport, [
|
|
371
367
|
'server',
|
|
372
368
|
'host'
|
|
373
369
|
], cliOptions.host), configExport;
|
|
@@ -396,10 +392,9 @@ function resolveConfigPath(root, customConfig) {
|
|
|
396
392
|
}
|
|
397
393
|
let isFileSync = (filePath)=>{
|
|
398
394
|
try {
|
|
399
|
-
|
|
400
|
-
return null == (_fs_statSync = node_fs.statSync(filePath, {
|
|
395
|
+
return node_fs.statSync(filePath, {
|
|
401
396
|
throwIfNoEntry: !1
|
|
402
|
-
})
|
|
397
|
+
})?.isFile();
|
|
403
398
|
} catch {
|
|
404
399
|
return !1;
|
|
405
400
|
}
|
|
@@ -426,14 +421,13 @@ let removeDir = (dir)=>{
|
|
|
426
421
|
}, DOTENV_LINE = /(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/gm;
|
|
427
422
|
function getNormalizedPluginsByHook(hook, plugins) {
|
|
428
423
|
let pluginMap = new Map();
|
|
429
|
-
return
|
|
424
|
+
return plugins?.forEach((plugin)=>{
|
|
430
425
|
plugin[hook] && pluginMap.set(plugin.name, plugin);
|
|
431
426
|
}), Array.from(pluginMap.values());
|
|
432
427
|
}
|
|
433
428
|
async function applyBundleAnalyzeConfig({ config }) {
|
|
434
|
-
var _config_plugins;
|
|
435
429
|
let { default: { BundleAnalyzerPlugin } } = await import("../compiled/webpack-bundle-analyzer/index.js");
|
|
436
|
-
return
|
|
430
|
+
return config.plugins?.push(new BundleAnalyzerPlugin({
|
|
437
431
|
analyzerPort: 'auto'
|
|
438
432
|
})), config;
|
|
439
433
|
}
|
|
@@ -513,7 +507,7 @@ let MODULE_PATH_REGEX = /.*[\\/]node_modules[\\/](?!\.pnpm[\\/])(?:(@[^\\/]+)[\\
|
|
|
513
507
|
priority: -9,
|
|
514
508
|
test: NODE_MODULES_REGEX,
|
|
515
509
|
name: (module)=>module ? function(modulePath) {
|
|
516
|
-
let handleModuleContext =
|
|
510
|
+
let handleModuleContext = modulePath?.match(MODULE_PATH_REGEX);
|
|
517
511
|
if (!handleModuleContext) return;
|
|
518
512
|
let [, scope, name] = handleModuleContext;
|
|
519
513
|
return [
|
|
@@ -619,19 +613,16 @@ class TypedCssModulesPlugin {
|
|
|
619
613
|
});
|
|
620
614
|
}
|
|
621
615
|
async generateCssTypings(incremental) {
|
|
622
|
-
let cssModulesFiles = (await glob(this.globPattern)).filter((file)=>{
|
|
623
|
-
var _this_userOptions;
|
|
624
|
-
return isCSSModules({
|
|
616
|
+
let cssModulesFiles = (await glob(this.globPattern)).filter((file)=>isCSSModules({
|
|
625
617
|
resourcePath: file,
|
|
626
|
-
modules:
|
|
627
|
-
});
|
|
628
|
-
}), doTask = incremental ? generateTypingIfNecessary : writeFile;
|
|
618
|
+
modules: this.userOptions?.modules
|
|
619
|
+
})), doTask = incremental ? generateTypingIfNecessary : writeFile;
|
|
629
620
|
return Promise.all(cssModulesFiles.map((file)=>doTask(this.dtsCreator, file)));
|
|
630
621
|
}
|
|
631
622
|
constructor(options){
|
|
632
623
|
_define_property(this, "dtsCreator", void 0), _define_property(this, "useIncremental", !1), _define_property(this, "globPattern", 'src/**/*.{css,less,scss}'), _define_property(this, "userOptions", void 0), this.userOptions = options, this.dtsCreator = new DtsCreator({
|
|
633
624
|
camelCase: !0,
|
|
634
|
-
namedExports:
|
|
625
|
+
namedExports: !1
|
|
635
626
|
});
|
|
636
627
|
}
|
|
637
628
|
}
|
|
@@ -648,7 +639,7 @@ class JsMinifyPlugin {
|
|
|
648
639
|
apply(compiler) {
|
|
649
640
|
let meta = JSON.stringify({
|
|
650
641
|
name: jsMinify_PLUGIN_NAME,
|
|
651
|
-
version: "3.3.
|
|
642
|
+
version: "3.3.5",
|
|
652
643
|
options: this.minifyOptions
|
|
653
644
|
});
|
|
654
645
|
compiler.hooks.compilation.tap(jsMinify_PLUGIN_NAME, (compilation)=>{
|
|
@@ -680,13 +671,12 @@ class JsMinifyPlugin {
|
|
|
680
671
|
constructor(options = {}){
|
|
681
672
|
jsMinify_define_property(this, "minifyOptions", void 0), jsMinify_define_property(this, "customMinify", void 0);
|
|
682
673
|
let { implementation, ...minifyOptions } = options;
|
|
683
|
-
this.customMinify =
|
|
674
|
+
this.customMinify = implementation?.minify, this.minifyOptions = minifyOptions;
|
|
684
675
|
}
|
|
685
676
|
}
|
|
686
677
|
var oxlint_dirname = __webpack_dirname__(__webpack_fileURLToPath__(import.meta.url));
|
|
687
678
|
class OxlintPlugin {
|
|
688
679
|
runOxlint(args) {
|
|
689
|
-
var _child_stdout, _child_stderr;
|
|
690
680
|
let child = spawn('npx', [
|
|
691
681
|
'--yes',
|
|
692
682
|
...args
|
|
@@ -699,12 +689,12 @@ class OxlintPlugin {
|
|
|
699
689
|
FORCE_COLOR: '1'
|
|
700
690
|
}
|
|
701
691
|
}), output = '';
|
|
702
|
-
|
|
692
|
+
child.stdout?.on('data', (data)=>{
|
|
703
693
|
output += data.toString();
|
|
704
694
|
}), child.on('exit', (code)=>{
|
|
705
695
|
let hasErrors = !output.includes('Found 0 warnings and 0 errors'), hasNoFiles = output.includes('on 0 files');
|
|
706
696
|
(hasErrors || 0 !== code) && !hasNoFiles && process.stdout.write(output);
|
|
707
|
-
}),
|
|
697
|
+
}), child.stderr?.on('data', (data)=>{
|
|
708
698
|
process.stderr.write(data);
|
|
709
699
|
});
|
|
710
700
|
}
|
|
@@ -879,12 +869,12 @@ async function compileDone(compiler, stats) {
|
|
|
879
869
|
}), logger_logger.ready(colors.green(`built in ${prettyTime(compileTime)}`));
|
|
880
870
|
else {
|
|
881
871
|
let fileInfo = function(changedFiles, removedFiles, root) {
|
|
882
|
-
if (!
|
|
883
|
-
if (
|
|
872
|
+
if (!changedFiles?.length && !removedFiles?.length) return null;
|
|
873
|
+
if (changedFiles?.length && removedFiles?.length) {
|
|
884
874
|
let changedInfo = formatFileList(changedFiles, root), removedInfo = formatFileList(removedFiles, root);
|
|
885
875
|
return `${changedInfo}, removed ${removedInfo}`;
|
|
886
876
|
}
|
|
887
|
-
return
|
|
877
|
+
return changedFiles?.length ? formatFileList(changedFiles, root) : removedFiles?.length ? `removed ${formatFileList(removedFiles, root)}` : null;
|
|
888
878
|
}(compiler.modifiedFiles ? Array.from(compiler.modifiedFiles) : null, compiler.removedFiles ? Array.from(compiler.removedFiles) : null, root);
|
|
889
879
|
if (!fileInfo) return;
|
|
890
880
|
if (fileInfo === lastFileInfo ? sameCount++ : (lastFileInfo = fileInfo, sameCount = 1), isDebug()) {
|
|
@@ -892,7 +882,7 @@ async function compileDone(compiler, stats) {
|
|
|
892
882
|
let nodeModulesStats, nodeModulesPath;
|
|
893
883
|
Object.entries((modules = stats.compilation.modules, nodeModulesStats = {}, nodeModulesPath = node_path.resolve(root, 'node_modules'), modules.forEach((module)=>{
|
|
894
884
|
let { resource } = module;
|
|
895
|
-
if (
|
|
885
|
+
if (resource?.includes(nodeModulesPath)) {
|
|
896
886
|
let packageName, pathParts = node_path.relative(nodeModulesPath, resource).split(sep);
|
|
897
887
|
(packageName = '.pnpm' === pathParts[0] && pathParts.length >= 4 ? pathParts[3].startsWith('@') ? `${pathParts[3]}/${pathParts[4]}` : pathParts[3] : pathParts[0].startsWith('@') ? `${pathParts[0]}/${pathParts[1]}` : pathParts[0]) && (nodeModulesStats[packageName] = (nodeModulesStats[packageName] || 0) + 1);
|
|
898
888
|
}
|
|
@@ -935,9 +925,8 @@ class ProgressRspackPlugin extends rspack.ProgressPlugin {
|
|
|
935
925
|
}
|
|
936
926
|
}
|
|
937
927
|
async function applyTypeCheckConfig({ config, unpackConfig }) {
|
|
938
|
-
var _config_plugins;
|
|
939
928
|
let { TsCheckerRspackPlugin } = await import("ts-checker-rspack-plugin"), tsconfigPath = node_path.resolve(unpackConfig.root, 'tsconfig.json');
|
|
940
|
-
return
|
|
929
|
+
return config.plugins?.push(new TsCheckerRspackPlugin({
|
|
941
930
|
typescript: {
|
|
942
931
|
mode: 'readonly',
|
|
943
932
|
memoryLimit: 8192,
|
|
@@ -955,7 +944,8 @@ async function applyTypeCheckConfig({ config, unpackConfig }) {
|
|
|
955
944
|
},
|
|
956
945
|
logger: {
|
|
957
946
|
log (message) {
|
|
958
|
-
|
|
947
|
+
let count = +(/(\d+) errors?/.exec(message)?.[1] || 0);
|
|
948
|
+
count > 0 && console.log(`Found ${colors.red(colors.bold(`${count} ${1 === count ? 'error' : 'errors'}`))}`);
|
|
959
949
|
},
|
|
960
950
|
error (message) {
|
|
961
951
|
message.includes('RpcExitError') || message.includes('out of memory') || console.log(message.replace(/ERROR/g, 'Type Error'));
|
|
@@ -964,7 +954,6 @@ async function applyTypeCheckConfig({ config, unpackConfig }) {
|
|
|
964
954
|
})), config;
|
|
965
955
|
}
|
|
966
956
|
async function getBundlerConfig(originalUnpackConfig) {
|
|
967
|
-
var _unpackConfig_build, _unpackConfig_build1, _unpackConfig_build2, _unpackConfig_build3, _unpackConfig_build4, _unpackConfig_build5, _unpackConfig_build6, _unpackConfig_html, _unpackConfig_html1, _unpackConfig_html2, _unpackConfig_html3, _unpackConfig_html4, _unpackConfig_html5, _unpackConfig_html6, _unpackConfig_html7, _unpackConfig_performance, _unpackConfig_build7, _unpackConfig_resolve, _unpackConfig_resolve1, _unpackConfig_dev, _unpackConfig_build8, _unpackConfig_experiments, _unpackConfig_build9, _unpackConfig_dev1, _unpackConfig_performance1;
|
|
968
957
|
let circularCount, { plugins, bundlerConfig, ...rest } = originalUnpackConfig;
|
|
969
958
|
for (let plugin of getNormalizedPluginsByHook('config', plugins))rest = await plugin.config(rest, {
|
|
970
959
|
...originalUnpackConfig._context,
|
|
@@ -974,7 +963,7 @@ async function getBundlerConfig(originalUnpackConfig) {
|
|
|
974
963
|
...rest,
|
|
975
964
|
plugins,
|
|
976
965
|
bundlerConfig
|
|
977
|
-
}, tsconfigPath = node_path.resolve(unpackConfig.root, 'tsconfig.json'), isTs = node_fs.existsSync(tsconfigPath), minifyOptions = isPlainObject(
|
|
966
|
+
}, tsconfigPath = node_path.resolve(unpackConfig.root, 'tsconfig.json'), isTs = node_fs.existsSync(tsconfigPath), minifyOptions = isPlainObject(unpackConfig.build?.minify) ? unpackConfig.build?.minify : {}, ProgressPlugin = unpackConfig.build?.progressBar ? ProgressRspackPlugin : ProgressLiteRspackPlugin, { publicVars, filePaths: envFilePaths } = function({ cwd = process.cwd(), mode = getNodeEnv(), prefixes = [
|
|
978
967
|
'PUBLIC_'
|
|
979
968
|
], processEnv = process.env } = {}) {
|
|
980
969
|
if ('local' === mode) throw Error(`${colors.yellow('local')} cannot be used as a value for env mode, because ${colors.yellow('.env.local')} represents a temporary local file. Please use another value.`);
|
|
@@ -1032,23 +1021,23 @@ async function getBundlerConfig(originalUnpackConfig) {
|
|
|
1032
1021
|
path: node_path.resolve(unpackConfig.root, unpackConfig.build.outDir),
|
|
1033
1022
|
filename: getOutputFilename({
|
|
1034
1023
|
type: 'js',
|
|
1035
|
-
hash:
|
|
1024
|
+
hash: unpackConfig.build?.filenameHash
|
|
1036
1025
|
}),
|
|
1037
1026
|
chunkFilename: getOutputFilename({
|
|
1038
1027
|
type: 'js',
|
|
1039
|
-
hash:
|
|
1028
|
+
hash: unpackConfig.build?.filenameHash,
|
|
1040
1029
|
async: !0
|
|
1041
1030
|
}),
|
|
1042
1031
|
crossOriginLoading: 'anonymous',
|
|
1043
1032
|
pathinfo: !1,
|
|
1044
|
-
publicPath:
|
|
1033
|
+
publicPath: unpackConfig.build?.publicPath,
|
|
1045
1034
|
webassemblyModuleFilename: 'js/async/[hash].module.wasm',
|
|
1046
1035
|
assetModuleFilename: 'assets/[name].[contenthash:8][ext]'
|
|
1047
1036
|
},
|
|
1048
1037
|
infrastructureLogging: {
|
|
1049
1038
|
level: 'error'
|
|
1050
1039
|
},
|
|
1051
|
-
devtool:
|
|
1040
|
+
devtool: unpackConfig.build?.sourceMap,
|
|
1052
1041
|
module: {
|
|
1053
1042
|
rules: [
|
|
1054
1043
|
{
|
|
@@ -1079,26 +1068,26 @@ async function getBundlerConfig(originalUnpackConfig) {
|
|
|
1079
1068
|
...unpackConfig.define
|
|
1080
1069
|
}),
|
|
1081
1070
|
!unpackConfig.mpa && new rspack.HtmlRspackPlugin({
|
|
1082
|
-
template:
|
|
1083
|
-
templateContent:
|
|
1071
|
+
template: unpackConfig.html?.template || void 0,
|
|
1072
|
+
templateContent: unpackConfig.html?.templateContent || (unpackConfig.html?.template ? void 0 : TEMPLATE_CONTENT),
|
|
1084
1073
|
templateParameters: {
|
|
1085
1074
|
mountId: unpackConfig.html.mountId,
|
|
1086
|
-
title: isFunction(
|
|
1075
|
+
title: isFunction(unpackConfig.html?.title) ? unpackConfig.html?.title({
|
|
1087
1076
|
entryName: 'index'
|
|
1088
|
-
}) :
|
|
1089
|
-
headTag:
|
|
1090
|
-
...
|
|
1077
|
+
}) : unpackConfig.html?.title || '',
|
|
1078
|
+
headTag: unpackConfig.html?.headTag || '',
|
|
1079
|
+
...unpackConfig.html?.templateParameters
|
|
1091
1080
|
},
|
|
1092
1081
|
minify: !1,
|
|
1093
1082
|
chunks: [
|
|
1094
1083
|
'main'
|
|
1095
1084
|
]
|
|
1096
1085
|
}),
|
|
1097
|
-
|
|
1086
|
+
unpackConfig.performance?.removeMomentLocale && new rspack.IgnorePlugin({
|
|
1098
1087
|
resourceRegExp: /^\.\/locale$/,
|
|
1099
1088
|
contextRegExp: /moment$/
|
|
1100
1089
|
}),
|
|
1101
|
-
|
|
1090
|
+
unpackConfig.build?.copy && new rspack.CopyRspackPlugin({
|
|
1102
1091
|
patterns: unpackConfig.build.copy
|
|
1103
1092
|
}),
|
|
1104
1093
|
new ProgressPlugin(),
|
|
@@ -1145,7 +1134,7 @@ async function getBundlerConfig(originalUnpackConfig) {
|
|
|
1145
1134
|
tsConfig: isTs ? tsconfigPath : void 0,
|
|
1146
1135
|
alias: {
|
|
1147
1136
|
'@': node_path.resolve(unpackConfig.root, 'src'),
|
|
1148
|
-
...
|
|
1137
|
+
...unpackConfig.resolve?.alias
|
|
1149
1138
|
},
|
|
1150
1139
|
extensionAlias: {
|
|
1151
1140
|
'.js': [
|
|
@@ -1165,21 +1154,20 @@ async function getBundlerConfig(originalUnpackConfig) {
|
|
|
1165
1154
|
'.js',
|
|
1166
1155
|
'.wasm',
|
|
1167
1156
|
'.json',
|
|
1168
|
-
...
|
|
1157
|
+
...unpackConfig.resolve?.extensions || []
|
|
1169
1158
|
]
|
|
1170
1159
|
},
|
|
1171
|
-
lazyCompilation:
|
|
1160
|
+
lazyCompilation: unpackConfig.dev?.lazyCompilation && utils_isDevServer() && {
|
|
1172
1161
|
imports: !0,
|
|
1173
1162
|
entries: !!unpackConfig.mpa
|
|
1174
1163
|
},
|
|
1175
1164
|
experiments: {
|
|
1176
1165
|
css: !1,
|
|
1177
|
-
asyncWebAssembly: !0
|
|
1178
|
-
lazyBarrel: !0
|
|
1166
|
+
asyncWebAssembly: !0
|
|
1179
1167
|
},
|
|
1180
1168
|
optimization: {
|
|
1181
1169
|
moduleIds: isDev() ? 'named' : 'deterministic',
|
|
1182
|
-
minimize: !!
|
|
1170
|
+
minimize: !!unpackConfig.build?.minify,
|
|
1183
1171
|
minimizer: [
|
|
1184
1172
|
new JsMinifyPlugin(mergeConfig({
|
|
1185
1173
|
compress: {
|
|
@@ -1199,9 +1187,9 @@ async function getBundlerConfig(originalUnpackConfig) {
|
|
|
1199
1187
|
};
|
|
1200
1188
|
for (let plugin of (config = (({ config, unpackConfig })=>{
|
|
1201
1189
|
let { chunkSplit } = unpackConfig.performance || {};
|
|
1202
|
-
if (
|
|
1190
|
+
if (chunkSplit?.strategy) {
|
|
1203
1191
|
let forceSplittingGroups = {};
|
|
1204
|
-
|
|
1192
|
+
chunkSplit?.forceSplitting && (forceSplittingGroups = function(forceSplitting, strategy) {
|
|
1205
1193
|
let cacheGroups = {};
|
|
1206
1194
|
for (let [key, regexp] of Array.isArray(forceSplitting) ? forceSplitting.map((regexp, index)=>[
|
|
1207
1195
|
`force-split-${index}`,
|
|
@@ -1227,26 +1215,25 @@ async function getBundlerConfig(originalUnpackConfig) {
|
|
|
1227
1215
|
}
|
|
1228
1216
|
return config;
|
|
1229
1217
|
})({
|
|
1230
|
-
config: config =
|
|
1231
|
-
var _unpackConfig_build, _unpackConfig_build1, _unpackConfig_css, _unpackConfig_css1;
|
|
1218
|
+
config: config = unpackConfig.experiments?.css ? function({ config, unpackConfig }) {
|
|
1232
1219
|
config.output.cssFilename = getOutputFilename({
|
|
1233
1220
|
type: 'css',
|
|
1234
|
-
hash:
|
|
1221
|
+
hash: unpackConfig.build?.filenameHash
|
|
1235
1222
|
}), config.output.cssChunkFilename = getOutputFilename({
|
|
1236
1223
|
type: 'css',
|
|
1237
|
-
hash:
|
|
1224
|
+
hash: unpackConfig.build?.filenameHash,
|
|
1238
1225
|
async: !0
|
|
1239
1226
|
}), setValueByPath(config, [
|
|
1240
1227
|
'experiments',
|
|
1241
1228
|
'css'
|
|
1242
1229
|
], !0);
|
|
1243
|
-
let sourceMap =
|
|
1230
|
+
let sourceMap = unpackConfig.css?.sourceMap, modules = unpackConfig.css?.modules;
|
|
1244
1231
|
isPlainObject(modules) || !1 === modules || (modules = {}), !1 !== modules && !1 !== modules.auto && (setValueByPath(config, [
|
|
1245
1232
|
'module',
|
|
1246
1233
|
'parser',
|
|
1247
1234
|
'css/module'
|
|
1248
1235
|
], {
|
|
1249
|
-
namedExports:
|
|
1236
|
+
namedExports: !1
|
|
1250
1237
|
}), setValueByPath(config, [
|
|
1251
1238
|
'module',
|
|
1252
1239
|
'generator',
|
|
@@ -1263,42 +1250,31 @@ async function getBundlerConfig(originalUnpackConfig) {
|
|
|
1263
1250
|
use,
|
|
1264
1251
|
type: 'css/module'
|
|
1265
1252
|
};
|
|
1266
|
-
}, getThreadLoader = ()=>{
|
|
1267
|
-
var _unpackConfig_build;
|
|
1268
|
-
return (null == (_unpackConfig_build = unpackConfig.build) ? void 0 : _unpackConfig_build.parallel) && isProd() && {
|
|
1253
|
+
}, getThreadLoader = ()=>unpackConfig.build?.parallel && isProd() && {
|
|
1269
1254
|
loader: require.resolve('thread-loader'),
|
|
1270
1255
|
options: THREAD_OPTIONS
|
|
1271
|
-
}
|
|
1272
|
-
}, getLessLoader = ()=>{
|
|
1273
|
-
var _unpackConfig_css;
|
|
1274
|
-
return {
|
|
1256
|
+
}, getLessLoader = ()=>({
|
|
1275
1257
|
loader: getCompiledPkgPath('less-loader'),
|
|
1276
1258
|
options: {
|
|
1277
1259
|
lessOptions: mergeConfig({
|
|
1278
1260
|
javascriptEnabled: !0
|
|
1279
|
-
},
|
|
1261
|
+
}, unpackConfig.css?.less || {}),
|
|
1280
1262
|
implementation: getUserDepPath(unpackConfig.root, 'less'),
|
|
1281
1263
|
sourceMap
|
|
1282
1264
|
}
|
|
1283
|
-
}
|
|
1284
|
-
}, getCssLoader = ()=>{
|
|
1285
|
-
var _unpackConfig_css, _unpackConfig_css1, _unpackConfig_css2;
|
|
1286
|
-
return (null == (_unpackConfig_css = unpackConfig.css) ? void 0 : _unpackConfig_css.transformer) === 'lightningcss' ? {
|
|
1265
|
+
}), getCssLoader = ()=>unpackConfig.css?.transformer === 'lightningcss' ? {
|
|
1287
1266
|
loader: 'builtin:lightningcss-loader',
|
|
1288
1267
|
options: {
|
|
1289
1268
|
targets: esVersionToBrowserslist(unpackConfig.build.target),
|
|
1290
|
-
...
|
|
1269
|
+
...unpackConfig.css?.lightningcss
|
|
1291
1270
|
}
|
|
1292
1271
|
} : {
|
|
1293
1272
|
loader: getCompiledPkgPath('postcss-loader'),
|
|
1294
1273
|
options: {
|
|
1295
|
-
postcssOptions:
|
|
1274
|
+
postcssOptions: unpackConfig.css?.postcss,
|
|
1296
1275
|
sourceMap
|
|
1297
1276
|
}
|
|
1298
|
-
}
|
|
1299
|
-
}, getSassLoader = ()=>{
|
|
1300
|
-
var _unpackConfig_css;
|
|
1301
|
-
return {
|
|
1277
|
+
}, getSassLoader = ()=>({
|
|
1302
1278
|
loader: getCompiledPkgPath('sass-loader'),
|
|
1303
1279
|
options: {
|
|
1304
1280
|
api: 'modern-compiler',
|
|
@@ -1306,11 +1282,10 @@ async function getBundlerConfig(originalUnpackConfig) {
|
|
|
1306
1282
|
'sass-embedded',
|
|
1307
1283
|
'sass'
|
|
1308
1284
|
]),
|
|
1309
|
-
sassOptions:
|
|
1285
|
+
sassOptions: unpackConfig.css?.sass,
|
|
1310
1286
|
sourceMap
|
|
1311
1287
|
}
|
|
1312
|
-
};
|
|
1313
|
-
};
|
|
1288
|
+
});
|
|
1314
1289
|
return config.module.rules.push({
|
|
1315
1290
|
test: /\.css$/i,
|
|
1316
1291
|
oneOf: [
|
|
@@ -1369,8 +1344,7 @@ async function getBundlerConfig(originalUnpackConfig) {
|
|
|
1369
1344
|
config,
|
|
1370
1345
|
unpackConfig
|
|
1371
1346
|
}) : function({ config, unpackConfig }) {
|
|
1372
|
-
|
|
1373
|
-
let sourceMap = null == (_unpackConfig_css = unpackConfig.css) ? void 0 : _unpackConfig_css.sourceMap, modules = null == (_unpackConfig_css1 = unpackConfig.css) ? void 0 : _unpackConfig_css1.modules;
|
|
1347
|
+
let sourceMap = unpackConfig.css?.sourceMap, modules = unpackConfig.css?.modules;
|
|
1374
1348
|
isPlainObject(modules) || !1 === modules || (modules = {});
|
|
1375
1349
|
let getCommonRules = ({ importLoaders })=>[
|
|
1376
1350
|
utils_isDevServer() ? {
|
|
@@ -1399,7 +1373,7 @@ async function getBundlerConfig(originalUnpackConfig) {
|
|
|
1399
1373
|
})(),
|
|
1400
1374
|
localIdentName: !1 !== modules && (modules.localIdentName || CSS_MODULES_LOCAL_IDENT_NAME),
|
|
1401
1375
|
exportLocalsConvention: EXPORT_LOCALS_CONVENTION,
|
|
1402
|
-
namedExport:
|
|
1376
|
+
namedExport: !1
|
|
1403
1377
|
},
|
|
1404
1378
|
sourceMap
|
|
1405
1379
|
}
|
|
@@ -1408,31 +1382,28 @@ async function getBundlerConfig(originalUnpackConfig) {
|
|
|
1408
1382
|
utils_isDevServer() || config.plugins.push(new rspack.CssExtractRspackPlugin({
|
|
1409
1383
|
filename: getOutputFilename({
|
|
1410
1384
|
type: 'css',
|
|
1411
|
-
hash:
|
|
1385
|
+
hash: unpackConfig.build?.filenameHash
|
|
1412
1386
|
}),
|
|
1413
1387
|
chunkFilename: getOutputFilename({
|
|
1414
1388
|
type: 'css',
|
|
1415
|
-
hash:
|
|
1389
|
+
hash: unpackConfig.build?.filenameHash,
|
|
1416
1390
|
async: !0
|
|
1417
1391
|
}),
|
|
1418
1392
|
ignoreOrder: !0
|
|
1419
1393
|
}));
|
|
1420
|
-
let getCssLoader = ()=>{
|
|
1421
|
-
var _unpackConfig_css, _unpackConfig_css1, _unpackConfig_css2;
|
|
1422
|
-
return (null == (_unpackConfig_css = unpackConfig.css) ? void 0 : _unpackConfig_css.transformer) === 'lightningcss' ? {
|
|
1394
|
+
let getCssLoader = ()=>unpackConfig.css?.transformer === 'lightningcss' ? {
|
|
1423
1395
|
loader: 'builtin:lightningcss-loader',
|
|
1424
1396
|
options: {
|
|
1425
1397
|
targets: esVersionToBrowserslist(unpackConfig.build.target),
|
|
1426
|
-
...
|
|
1398
|
+
...unpackConfig.css?.lightningcss
|
|
1427
1399
|
}
|
|
1428
1400
|
} : {
|
|
1429
1401
|
loader: getCompiledPkgPath('postcss-loader'),
|
|
1430
1402
|
options: {
|
|
1431
|
-
postcssOptions:
|
|
1403
|
+
postcssOptions: unpackConfig.css?.postcss,
|
|
1432
1404
|
sourceMap
|
|
1433
1405
|
}
|
|
1434
1406
|
};
|
|
1435
|
-
};
|
|
1436
1407
|
return config.module.rules.push({
|
|
1437
1408
|
test: /\.less$/i,
|
|
1438
1409
|
use: [
|
|
@@ -1440,7 +1411,7 @@ async function getBundlerConfig(originalUnpackConfig) {
|
|
|
1440
1411
|
importLoaders: 2
|
|
1441
1412
|
}),
|
|
1442
1413
|
getCssLoader(),
|
|
1443
|
-
|
|
1414
|
+
unpackConfig.build?.parallel && isProd() && {
|
|
1444
1415
|
loader: require.resolve('thread-loader'),
|
|
1445
1416
|
options: THREAD_OPTIONS
|
|
1446
1417
|
},
|
|
@@ -1449,7 +1420,7 @@ async function getBundlerConfig(originalUnpackConfig) {
|
|
|
1449
1420
|
options: {
|
|
1450
1421
|
lessOptions: mergeConfig({
|
|
1451
1422
|
javascriptEnabled: !0
|
|
1452
|
-
},
|
|
1423
|
+
}, unpackConfig.css?.less || {}),
|
|
1453
1424
|
implementation: getUserDepPath(unpackConfig.root, 'less'),
|
|
1454
1425
|
sourceMap
|
|
1455
1426
|
}
|
|
@@ -1478,7 +1449,7 @@ async function getBundlerConfig(originalUnpackConfig) {
|
|
|
1478
1449
|
'sass-embedded',
|
|
1479
1450
|
'sass'
|
|
1480
1451
|
]),
|
|
1481
|
-
sassOptions:
|
|
1452
|
+
sassOptions: unpackConfig.css?.sass,
|
|
1482
1453
|
sourceMap
|
|
1483
1454
|
}
|
|
1484
1455
|
}
|
|
@@ -1489,11 +1460,11 @@ async function getBundlerConfig(originalUnpackConfig) {
|
|
|
1489
1460
|
unpackConfig
|
|
1490
1461
|
}),
|
|
1491
1462
|
unpackConfig
|
|
1492
|
-
}),
|
|
1463
|
+
}), unpackConfig.build?.cache && !(utils_isDevServer() && unpackConfig.dev?.lazyCompilation) && (config = await applyCacheConfig({
|
|
1493
1464
|
config,
|
|
1494
1465
|
unpackConfig,
|
|
1495
1466
|
envFilePaths
|
|
1496
|
-
})),
|
|
1467
|
+
})), unpackConfig.performance?.bundleAnalyze && isProd() && (config = await applyBundleAnalyzeConfig({
|
|
1497
1468
|
config
|
|
1498
1469
|
})), unpackConfig.typeCheck && isDev() && isTs && (config = await applyTypeCheckConfig({
|
|
1499
1470
|
config,
|
|
@@ -1513,7 +1484,7 @@ async function unpackBuild(unpackConfig) {
|
|
|
1513
1484
|
console.error(err.stack || err), err.details && console.error(err.details);
|
|
1514
1485
|
return;
|
|
1515
1486
|
}
|
|
1516
|
-
|
|
1487
|
+
stats?.hasErrors() && console.log(stats.toString({
|
|
1517
1488
|
colors: !0,
|
|
1518
1489
|
preset: 'errors-only'
|
|
1519
1490
|
})), isWatch() || compiler.close(()=>{});
|
|
@@ -1588,13 +1559,13 @@ let getExternalLibraryName = (pkgName)=>({
|
|
|
1588
1559
|
'react-dom': 'ReactDOM',
|
|
1589
1560
|
'react-router-dom': 'ReactRouterDOM'
|
|
1590
1561
|
})[pkgName] || pkgName, getExternalValue = (pkgName)=>`window ${getExternalLibraryName(pkgName)}`, prebundleDeps = async ({ unpackConfig })=>{
|
|
1591
|
-
var
|
|
1562
|
+
var externals;
|
|
1592
1563
|
let existExternals, cacheDir, count = {
|
|
1593
1564
|
total: 0,
|
|
1594
1565
|
bundled: 0
|
|
1595
1566
|
}, failedDeps = [], root = unpackConfig.root, failedDepsCachePath = node_path.resolve(root, TEMP_DIR, 'failed-deps.json'), failedCache = node_fs.existsSync(failedDepsCachePath) ? JSON.parse(node_fs.readFileSync(failedDepsCachePath, 'utf-8')) : {}, updateProgress = ()=>{
|
|
1596
1567
|
logUpdate(`${colors.magenta('»')} optimizing dependencies (${count.bundled}/${count.total})`), count.total === count.bundled + failedDeps.length && console.log();
|
|
1597
|
-
}, userOptions = isPlainObject(
|
|
1568
|
+
}, userOptions = isPlainObject(unpackConfig.dev?.prebundle) ? unpackConfig.dev.prebundle : {}, ignoreCSSDeps = userOptions.ignoreCSS || [], packageJson = JSON.parse(node_fs.readFileSync(node_path.resolve(root, 'package.json'), 'utf-8')), excludeDeps = [
|
|
1598
1569
|
...(externals = unpackConfig.externals, existExternals = new Set(), Array.isArray(externals) ? externals.forEach((item)=>{
|
|
1599
1570
|
isPlainObject(item) && Object.keys(item).forEach((key)=>{
|
|
1600
1571
|
existExternals.add(key);
|
|
@@ -1743,7 +1714,7 @@ let getExternalLibraryName = (pkgName)=>({
|
|
|
1743
1714
|
});
|
|
1744
1715
|
compiler.run((_, stats)=>{
|
|
1745
1716
|
let isFailed = !1;
|
|
1746
|
-
|
|
1717
|
+
stats?.hasErrors() ? (isFailed = !0, failedDeps.push(name), failedCache[name] = version, removeDir(outDir)) : count.bundled++, updateProgress(), compiler.close(()=>{
|
|
1747
1718
|
resolve(isFailed ? void 0 : getResult());
|
|
1748
1719
|
});
|
|
1749
1720
|
});
|
|
@@ -1786,8 +1757,7 @@ let getExternalLibraryName = (pkgName)=>({
|
|
|
1786
1757
|
}, unpackConfig.plugins.push({
|
|
1787
1758
|
name: 'unpack:prebundle',
|
|
1788
1759
|
config: (config)=>{
|
|
1789
|
-
|
|
1790
|
-
let originalHeadTag = (null == (_config_html = config.html) ? void 0 : _config_html.headTag) || '', sortedPreTags = preJsAssets.sort((a, b)=>a.order - b.order).map((item)=>item.path).map((item)=>`<script defer src="${item}"></script>`);
|
|
1760
|
+
let originalHeadTag = config.html?.headTag || '', sortedPreTags = preJsAssets.sort((a, b)=>a.order - b.order).map((item)=>item.path).map((item)=>`<script defer src="${item}"></script>`);
|
|
1791
1761
|
return setValueByPath(config, [
|
|
1792
1762
|
'html',
|
|
1793
1763
|
'headTag'
|
|
@@ -1806,12 +1776,11 @@ let getExternalLibraryName = (pkgName)=>({
|
|
|
1806
1776
|
}), unpackConfig;
|
|
1807
1777
|
};
|
|
1808
1778
|
async function unpackDev(originalUnpackConfig) {
|
|
1809
|
-
var _unpackConfig_dev, _unpackConfig_server, _unpackConfig_server1, _unpackConfig_dev1, _unpackConfig_server2, _unpackConfig_server3;
|
|
1810
1779
|
let unpackConfig = originalUnpackConfig;
|
|
1811
|
-
|
|
1780
|
+
unpackConfig.dev?.prebundle && (unpackConfig = await prebundleDeps({
|
|
1812
1781
|
unpackConfig
|
|
1813
1782
|
}));
|
|
1814
|
-
let compiler = rspack(await getBundlerConfig(unpackConfig)), port = await getPort(
|
|
1783
|
+
let compiler = rspack(await getBundlerConfig(unpackConfig)), port = await getPort(unpackConfig.server?.port), proxyConfig = unpackConfig.server?.proxy;
|
|
1815
1784
|
isPlainObject(proxyConfig) && (proxyConfig = Object.entries(proxyConfig).map(([contextStr, target])=>{
|
|
1816
1785
|
let baseConfig = {
|
|
1817
1786
|
context: contextStr.split(','),
|
|
@@ -1834,16 +1803,15 @@ async function unpackDev(originalUnpackConfig) {
|
|
|
1834
1803
|
},
|
|
1835
1804
|
proxy: proxyConfig,
|
|
1836
1805
|
devMiddleware: {
|
|
1837
|
-
writeToDisk:
|
|
1806
|
+
writeToDisk: unpackConfig.dev?.writeToDisk
|
|
1838
1807
|
}
|
|
1839
1808
|
};
|
|
1840
1809
|
devServerOptions.setupMiddlewares = (middlewares)=>(middlewares.unshift((req, _, next)=>{
|
|
1841
|
-
|
|
1842
|
-
(null == (_req_headers_accept = req.headers.accept) ? void 0 : _req_headers_accept.includes('html')) && (req.url = '/index.html'), next();
|
|
1810
|
+
req.headers.accept?.includes('html') && (req.url = '/index.html'), next();
|
|
1843
1811
|
}), middlewares.unshift(experiments.lazyCompilationMiddleware(compiler)), middlewares);
|
|
1844
1812
|
let server = new RspackDevServer(devServerOptions, compiler);
|
|
1845
|
-
await server.start(), logger_logger.greet(` ${colors.green(`${colors.bold(unpackConfig._context.callerName.toUpperCase())} v3.3.
|
|
1846
|
-
let open =
|
|
1813
|
+
await server.start(), logger_logger.greet(` ${colors.green(`${colors.bold(unpackConfig._context.callerName.toUpperCase())} v3.3.5`)} ${colors.dim('ready in')} ${colors.bold(Math.ceil(performance.now() - global.__unpack_start_time))} ms\n`), printAddressUrls(port, unpackConfig.server?.host), addRestartCleaner(()=>server.stop(), ()=>new Promise((resolve)=>compiler.close(()=>resolve())));
|
|
1814
|
+
let open = unpackConfig.server?.open, url = isString(open) ? open : `http://localhost:${port}`;
|
|
1847
1815
|
open && openBrowser(url), setupCliShortcuts({
|
|
1848
1816
|
openPage: async ()=>{
|
|
1849
1817
|
await openBrowser(url);
|
|
@@ -1852,8 +1820,7 @@ async function unpackDev(originalUnpackConfig) {
|
|
|
1852
1820
|
await cleanUpBeforeRestart(), process.exit(0);
|
|
1853
1821
|
},
|
|
1854
1822
|
printUrls: ()=>{
|
|
1855
|
-
|
|
1856
|
-
printAddressUrls(port, null == (_unpackConfig_server = unpackConfig.server) ? void 0 : _unpackConfig_server.host);
|
|
1823
|
+
printAddressUrls(port, unpackConfig.server?.host);
|
|
1857
1824
|
},
|
|
1858
1825
|
restartServer: async ()=>{
|
|
1859
1826
|
logger_logger.clear(), await cleanUpBeforeRestart(), createUnpack({
|
|
@@ -1916,7 +1883,7 @@ function createUnpack({ cwd = process.cwd(), config, callerName = 'unpack' }) {
|
|
|
1916
1883
|
...mergeConfig(defaultConfig, config),
|
|
1917
1884
|
_context: {
|
|
1918
1885
|
callerName,
|
|
1919
|
-
version: "3.3.
|
|
1886
|
+
version: "3.3.5"
|
|
1920
1887
|
}
|
|
1921
1888
|
};
|
|
1922
1889
|
};
|
|
@@ -1924,7 +1891,7 @@ function createUnpack({ cwd = process.cwd(), config, callerName = 'unpack' }) {
|
|
|
1924
1891
|
build: async ({ watch } = {})=>{
|
|
1925
1892
|
setNodeEnv(watch ? 'development' : 'production');
|
|
1926
1893
|
let config = resolveConfig();
|
|
1927
|
-
console.log(colors.rainbow(`${callerName} v3.3.
|
|
1894
|
+
console.log(colors.rainbow(`${callerName} v3.3.5`), colors.green(`building for ${getNodeEnv()}...`)), await unpackBuild(config);
|
|
1928
1895
|
},
|
|
1929
1896
|
dev: async ()=>{
|
|
1930
1897
|
global.__unpack_start_time = performance.now(), setNodeEnv('development'), setDevServer(!0);
|
|
@@ -1946,4 +1913,7 @@ async function createChokidar(pathOrGlobs, root = process.cwd(), options) {
|
|
|
1946
1913
|
...options
|
|
1947
1914
|
});
|
|
1948
1915
|
}
|
|
1949
|
-
|
|
1916
|
+
var __webpack_exports__CSS_NAMED_EXPORT = !1;
|
|
1917
|
+
import { fileURLToPath as __webpack_fileURLToPath__, pathToFileURL } from "node:url";
|
|
1918
|
+
import node_path, { dirname as __webpack_dirname__, join, sep } from "node:path";
|
|
1919
|
+
export { CSS_MODULES_LOCAL_IDENT_NAME, CSS_MODULES_REGEX, DEFAULT_DEV_HOST, DEV_DEFAULT_FILENAME, EXPORT_LOCALS_CONVENTION, logger_LogColor as LogColor, NODE_MODULES_REGEX, PROD_DEFAULT_FILENAME, TEMPLATE_CONTENT, TEMP_DIR, THREAD_OPTIONS, addRestartCleaner, cleanUpBeforeRestart, clearLine, colors, createChokidar, createUnpack, currentDevUnpackConfig, debounce, defineConfig, esVersionToBrowserslist, findExists, getAddressUrls, getCompiledPkgPath, getIpv4Interfaces, getNodeEnv, getPathInJs, getPort, getTime, getUserDepPath, getUserDepVersion, getValueByPath, isBoolean, isCI, isCSSModules, isDebug, isDev, utils_isDevServer as isDevServer, isEmptyDir, isFileExists, isFileSync, isFunction, isNodeVersionAtLeast, isObject, isPlainObject, isProd, isRegExp, isString, isUndefined, isWatch, isWin, launchEditor, loadConfig, logUpdate, logger_logger as logger, mergeConfig, pathExists, prettyTime, removeDir, resolveConfigPath, rspack, setCurrentDevUnpackConfig, setDevServer, setNodeEnv, setValueByPath, setupCliShortcuts, trackPerformance, __webpack_exports__CSS_NAMED_EXPORT as CSS_NAMED_EXPORT };
|