weapp-tailwindcss 4.8.2 → 4.8.4
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/{chunk-JPLWILCP.js → chunk-47NJZTIW.js} +5 -5
- package/dist/{chunk-Z6IWSDU3.js → chunk-5P342MNS.js} +21 -21
- package/dist/{chunk-IXZDFEPL.js → chunk-6EATUPTN.js} +33 -25
- package/dist/{chunk-HCXLLOIU.mjs → chunk-7KTLLGAG.mjs} +126 -52
- package/dist/{chunk-ACSKKIYM.js → chunk-AXEKXGG7.js} +3 -3
- package/dist/{chunk-OJRQGFJR.mjs → chunk-IHJU6M6B.mjs} +17 -9
- package/dist/chunk-JMYADIPN.mjs +10 -0
- package/dist/{chunk-H34KPZQW.js → chunk-K234IGOT.js} +2 -2
- package/dist/{chunk-GVPBDBX4.mjs → chunk-KSHK56CW.mjs} +1 -1
- package/dist/{chunk-K7AD7FLJ.js → chunk-MG4O3AGN.js} +6 -6
- package/dist/{chunk-5BZA7BAP.mjs → chunk-NLLCK6RM.mjs} +1 -1
- package/dist/{chunk-6OTI5FPH.mjs → chunk-UUVGNRUM.mjs} +1 -1
- package/dist/chunk-WGLBMNPG.js +7 -0
- package/dist/{chunk-W4ERVC6L.mjs → chunk-WTOLVORM.mjs} +1 -1
- package/dist/{chunk-467NHGLF.js → chunk-ZXU4EYKV.js} +111 -37
- package/dist/cli.js +73 -311
- package/dist/cli.mjs +71 -308
- package/dist/core.js +9 -9
- package/dist/core.mjs +3 -3
- package/dist/css-macro/postcss.js +1 -1
- package/dist/css-macro/postcss.mjs +1 -1
- package/dist/css-macro.js +1 -1
- package/dist/css-macro.mjs +1 -1
- package/dist/defaults.js +1 -1
- package/dist/defaults.mjs +1 -1
- package/dist/gulp.js +5 -5
- package/dist/gulp.mjs +4 -4
- package/dist/index.js +9 -9
- package/dist/index.mjs +7 -7
- package/dist/postcss-html-transform.js +1 -1
- package/dist/postcss-html-transform.mjs +1 -1
- package/dist/presets.js +3 -3
- package/dist/presets.mjs +2 -2
- package/dist/types.js +1 -1
- package/dist/types.mjs +1 -1
- package/dist/vite.js +6 -6
- package/dist/vite.mjs +4 -4
- package/dist/weapp-tw-runtime-loader.js +66 -2
- package/dist/webpack.js +7 -7
- package/dist/webpack.mjs +5 -5
- package/dist/webpack4.js +34 -27
- package/dist/webpack4.mjs +17 -10
- package/package.json +4 -4
- package/dist/chunk-QGH4JZRW.mjs +0 -18
- package/dist/chunk-UJIUFWXE.js +0 -15
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkK234IGOTjs = require('./chunk-K234IGOT.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkAXEKXGG7js = require('./chunk-AXEKXGG7.js');
|
|
7
7
|
|
|
8
8
|
// src/bundlers/webpack/shared/css-imports.ts
|
|
9
9
|
var CSS_EXT_RE = /\.(?:css|scss|sass|less|styl|pcss)$/i;
|
|
@@ -33,7 +33,7 @@ function rewriteTailwindcssRequestForCss(data, pkgDir) {
|
|
|
33
33
|
if (!CSS_EXT_RE.test(normalizedIssuer)) {
|
|
34
34
|
return;
|
|
35
35
|
}
|
|
36
|
-
const resolved =
|
|
36
|
+
const resolved = _chunkK234IGOTjs.resolveTailwindcssImport.call(void 0, request, pkgDir);
|
|
37
37
|
if (!resolved) {
|
|
38
38
|
return;
|
|
39
39
|
}
|
|
@@ -43,8 +43,8 @@ function applyTailwindcssCssImportRewrite(compiler, options) {
|
|
|
43
43
|
if (!options.enabled) {
|
|
44
44
|
return;
|
|
45
45
|
}
|
|
46
|
-
compiler.hooks.normalModuleFactory.tap(
|
|
47
|
-
factory.hooks.beforeResolve.tap(
|
|
46
|
+
compiler.hooks.normalModuleFactory.tap(_chunkAXEKXGG7js.pluginName, (factory) => {
|
|
47
|
+
factory.hooks.beforeResolve.tap(_chunkAXEKXGG7js.pluginName, (data) => {
|
|
48
48
|
rewriteTailwindcssRequestForCss(data, options.pkgDir);
|
|
49
49
|
});
|
|
50
50
|
});
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _chunkK234IGOTjs = require('./chunk-K234IGOT.js');
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
var _chunkLTJQUORKjs = require('./chunk-LTJQUORK.js');
|
|
@@ -20,7 +20,7 @@ var _chunkLTJQUORKjs = require('./chunk-LTJQUORK.js');
|
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
|
|
23
|
-
var
|
|
23
|
+
var _chunkAXEKXGG7js = require('./chunk-AXEKXGG7.js');
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
var _chunkUW3WHSZ5js = require('./chunk-UW3WHSZ5.js');
|
|
@@ -52,7 +52,7 @@ function updateStaticAttribute(ms, prop) {
|
|
|
52
52
|
const start = prop.value.loc.start.offset + 1;
|
|
53
53
|
const end = prop.value.loc.end.offset - 1;
|
|
54
54
|
if (start < end) {
|
|
55
|
-
ms.update(start, end,
|
|
55
|
+
ms.update(start, end, _chunkAXEKXGG7js.replaceWxml.call(void 0, prop.value.content));
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
58
|
function updateDirectiveExpression(ms, prop, jsHandler, runtimeSet) {
|
|
@@ -64,7 +64,7 @@ function updateDirectiveExpression(ms, prop, jsHandler, runtimeSet) {
|
|
|
64
64
|
if (start >= end) {
|
|
65
65
|
return;
|
|
66
66
|
}
|
|
67
|
-
const generated =
|
|
67
|
+
const generated = _chunkAXEKXGG7js.generateCode.call(void 0, prop.exp.content, {
|
|
68
68
|
jsHandler,
|
|
69
69
|
runtimeSet,
|
|
70
70
|
wrapExpression: true
|
|
@@ -93,7 +93,7 @@ function transformUVue(code, id, jsHandler, runtimeSet, options = {}) {
|
|
|
93
93
|
return;
|
|
94
94
|
}
|
|
95
95
|
const { customAttributesEntities, disabledDefaultTemplateHandler = false } = options;
|
|
96
|
-
const matchCustomAttribute =
|
|
96
|
+
const matchCustomAttribute = _chunkAXEKXGG7js.createAttributeMatcher.call(void 0, customAttributesEntities);
|
|
97
97
|
const ms = new (0, _magicstring2.default)(code);
|
|
98
98
|
const { descriptor, errors } = _compilersfc.parse.call(void 0, code);
|
|
99
99
|
if (errors.length === 0) {
|
|
@@ -216,8 +216,8 @@ async function formatPostcssSourceMap(rawMap, file) {
|
|
|
216
216
|
}
|
|
217
217
|
|
|
218
218
|
// src/bundlers/vite/index.ts
|
|
219
|
-
var debug =
|
|
220
|
-
var weappTailwindcssPackageDir =
|
|
219
|
+
var debug = _chunkAXEKXGG7js.createDebug.call(void 0, );
|
|
220
|
+
var weappTailwindcssPackageDir = _chunkK234IGOTjs.resolvePackageDir.call(void 0, "weapp-tailwindcss");
|
|
221
221
|
var weappTailwindcssDirPosix = slash(weappTailwindcssPackageDir);
|
|
222
222
|
function joinPosixPath(base, subpath) {
|
|
223
223
|
if (base.endsWith("/")) {
|
|
@@ -261,7 +261,7 @@ function isJavaScriptEntry(entry) {
|
|
|
261
261
|
function createBundleModuleGraphOptions(outputDir, entries) {
|
|
262
262
|
return {
|
|
263
263
|
resolve(specifier, importer) {
|
|
264
|
-
return
|
|
264
|
+
return _chunkK234IGOTjs.resolveOutputSpecifier.call(void 0, specifier, importer, outputDir, (candidate) => entries.has(candidate));
|
|
265
265
|
},
|
|
266
266
|
load(id) {
|
|
267
267
|
const entry = entries.get(id);
|
|
@@ -299,7 +299,7 @@ function applyLinkedResults(linked, entries, onLinkedUpdate, onApplied) {
|
|
|
299
299
|
}
|
|
300
300
|
function UnifiedViteWeappTailwindcssPlugin(options = {}) {
|
|
301
301
|
const rewriteCssImportsSpecified = Object.prototype.hasOwnProperty.call(options, "rewriteCssImports");
|
|
302
|
-
const opts =
|
|
302
|
+
const opts = _chunkAXEKXGG7js.getCompilerContext.call(void 0, options);
|
|
303
303
|
const {
|
|
304
304
|
disabled,
|
|
305
305
|
customAttributes,
|
|
@@ -321,17 +321,17 @@ function UnifiedViteWeappTailwindcssPlugin(options = {}) {
|
|
|
321
321
|
if (disabled) {
|
|
322
322
|
return;
|
|
323
323
|
}
|
|
324
|
-
const customAttributesEntities =
|
|
324
|
+
const customAttributesEntities = _chunkAXEKXGG7js.toCustomAttributesEntities.call(void 0, customAttributes);
|
|
325
325
|
const runtimeState = {
|
|
326
326
|
twPatcher: initialTwPatcher,
|
|
327
|
-
patchPromise:
|
|
327
|
+
patchPromise: _chunkAXEKXGG7js.createTailwindPatchPromise.call(void 0, initialTwPatcher),
|
|
328
328
|
refreshTailwindcssPatcher
|
|
329
329
|
};
|
|
330
330
|
let runtimeSet;
|
|
331
331
|
let runtimeSetPromise;
|
|
332
332
|
let resolvedConfig;
|
|
333
333
|
async function refreshRuntimeState(force) {
|
|
334
|
-
const refreshed = await
|
|
334
|
+
const refreshed = await _chunkAXEKXGG7js.refreshTailwindRuntimeState.call(void 0, runtimeState, force);
|
|
335
335
|
if (refreshed) {
|
|
336
336
|
runtimeSet = void 0;
|
|
337
337
|
runtimeSetPromise = void 0;
|
|
@@ -344,7 +344,7 @@ function UnifiedViteWeappTailwindcssPlugin(options = {}) {
|
|
|
344
344
|
return runtimeSet;
|
|
345
345
|
}
|
|
346
346
|
if (force || !runtimeSetPromise) {
|
|
347
|
-
const task2 =
|
|
347
|
+
const task2 = _chunkAXEKXGG7js.collectRuntimeClassSet.call(void 0, runtimeState.twPatcher, {
|
|
348
348
|
force: force || !runtimeSet,
|
|
349
349
|
skipRefresh: force
|
|
350
350
|
});
|
|
@@ -364,10 +364,10 @@ function UnifiedViteWeappTailwindcssPlugin(options = {}) {
|
|
|
364
364
|
const shouldRewriteCssImports = opts.rewriteCssImports !== false && (rewriteCssImportsSpecified || (_nullishCoalesce(runtimeState.twPatcher.majorVersion, () => ( 0))) >= 4);
|
|
365
365
|
const rewritePlugins = !shouldRewriteCssImports ? [] : [
|
|
366
366
|
{
|
|
367
|
-
name: `${
|
|
367
|
+
name: `${_chunkAXEKXGG7js.vitePluginName}:rewrite-css-imports`,
|
|
368
368
|
enforce: "pre",
|
|
369
369
|
resolveId(id, importer) {
|
|
370
|
-
const replacement =
|
|
370
|
+
const replacement = _chunkK234IGOTjs.resolveTailwindcssImport.call(void 0, id, weappTailwindcssDirPosix, { join: joinPosixPath });
|
|
371
371
|
if (!replacement) {
|
|
372
372
|
return null;
|
|
373
373
|
}
|
|
@@ -380,7 +380,7 @@ function UnifiedViteWeappTailwindcssPlugin(options = {}) {
|
|
|
380
380
|
if (!isCSSRequest(id)) {
|
|
381
381
|
return null;
|
|
382
382
|
}
|
|
383
|
-
const rewritten =
|
|
383
|
+
const rewritten = _chunkK234IGOTjs.rewriteTailwindcssImportsInCode.call(void 0, code, weappTailwindcssDirPosix, { join: joinPosixPath });
|
|
384
384
|
if (!rewritten) {
|
|
385
385
|
return null;
|
|
386
386
|
}
|
|
@@ -394,7 +394,7 @@ function UnifiedViteWeappTailwindcssPlugin(options = {}) {
|
|
|
394
394
|
const plugins = [
|
|
395
395
|
...rewritePlugins,
|
|
396
396
|
{
|
|
397
|
-
name: `${
|
|
397
|
+
name: `${_chunkAXEKXGG7js.vitePluginName}:post`,
|
|
398
398
|
enforce: "post",
|
|
399
399
|
configResolved(config) {
|
|
400
400
|
resolvedConfig = config;
|
|
@@ -420,7 +420,7 @@ function UnifiedViteWeappTailwindcssPlugin(options = {}) {
|
|
|
420
420
|
for (const [fileName, output] of entries) {
|
|
421
421
|
const entry = { fileName, output };
|
|
422
422
|
if (isJavaScriptEntry(entry)) {
|
|
423
|
-
const absolute =
|
|
423
|
+
const absolute = _chunkK234IGOTjs.toAbsoluteOutputPath.call(void 0, fileName, outDir);
|
|
424
424
|
jsEntries.set(absolute, entry);
|
|
425
425
|
}
|
|
426
426
|
}
|
|
@@ -484,7 +484,7 @@ function UnifiedViteWeappTailwindcssPlugin(options = {}) {
|
|
|
484
484
|
if (Array.isArray(groupedEntries.js)) {
|
|
485
485
|
for (const [file, originalSource] of groupedEntries.js) {
|
|
486
486
|
if (originalSource.type === "chunk") {
|
|
487
|
-
const absoluteFile =
|
|
487
|
+
const absoluteFile = _chunkK234IGOTjs.toAbsoluteOutputPath.call(void 0, file, outDir);
|
|
488
488
|
const initialRawSource = originalSource.code;
|
|
489
489
|
jsTaskFactories.push(async () => {
|
|
490
490
|
await _chunkLTJQUORKjs.processCachedTask.call(void 0, {
|
|
@@ -510,7 +510,7 @@ function UnifiedViteWeappTailwindcssPlugin(options = {}) {
|
|
|
510
510
|
});
|
|
511
511
|
});
|
|
512
512
|
} else if (uniAppX && originalSource.type === "asset") {
|
|
513
|
-
const absoluteFile =
|
|
513
|
+
const absoluteFile = _chunkK234IGOTjs.toAbsoluteOutputPath.call(void 0, file, outDir);
|
|
514
514
|
const rawSource = originalSource.source.toString();
|
|
515
515
|
jsTaskFactories.push(async () => {
|
|
516
516
|
await _chunkLTJQUORKjs.processCachedTask.call(void 0, {
|
|
@@ -581,7 +581,7 @@ function UnifiedViteWeappTailwindcssPlugin(options = {}) {
|
|
|
581
581
|
);
|
|
582
582
|
}
|
|
583
583
|
}
|
|
584
|
-
|
|
584
|
+
_chunkK234IGOTjs.pushConcurrentTaskFactories.call(void 0, tasks, jsTaskFactories);
|
|
585
585
|
await Promise.all(tasks);
|
|
586
586
|
for (const apply of pendingLinkedUpdates) {
|
|
587
587
|
apply();
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunk47NJZTIWjs = require('./chunk-47NJZTIW.js');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _chunkK234IGOTjs = require('./chunk-K234IGOT.js');
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
var _chunkLTJQUORKjs = require('./chunk-LTJQUORK.js');
|
|
@@ -18,7 +18,7 @@ var _chunkLTJQUORKjs = require('./chunk-LTJQUORK.js');
|
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
var
|
|
21
|
+
var _chunkAXEKXGG7js = require('./chunk-AXEKXGG7.js');
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
var _chunkUW3WHSZ5js = require('./chunk-UW3WHSZ5.js');
|
|
@@ -27,11 +27,11 @@ var _chunkUW3WHSZ5js = require('./chunk-UW3WHSZ5.js');
|
|
|
27
27
|
var _fs = require('fs'); var _fs2 = _interopRequireDefault(_fs);
|
|
28
28
|
var _path = require('path'); var _path2 = _interopRequireDefault(_path);
|
|
29
29
|
var _process = require('process'); var _process2 = _interopRequireDefault(_process);
|
|
30
|
-
var debug =
|
|
31
|
-
var weappTailwindcssPackageDir =
|
|
30
|
+
var debug = _chunkAXEKXGG7js.createDebug.call(void 0, );
|
|
31
|
+
var weappTailwindcssPackageDir = _chunkK234IGOTjs.resolvePackageDir.call(void 0, "weapp-tailwindcss");
|
|
32
32
|
var UnifiedWebpackPluginV5 = class {
|
|
33
33
|
constructor(options = {}) {
|
|
34
|
-
this.options =
|
|
34
|
+
this.options = _chunkAXEKXGG7js.getCompilerContext.call(void 0, options);
|
|
35
35
|
this.userSpecifiedRewriteCssImports = Object.prototype.hasOwnProperty.call(options, "rewriteCssImports");
|
|
36
36
|
this.appType = this.options.appType;
|
|
37
37
|
}
|
|
@@ -56,49 +56,57 @@ var UnifiedWebpackPluginV5 = class {
|
|
|
56
56
|
}
|
|
57
57
|
const shouldRewriteCssImports = this.options.rewriteCssImports !== false && (this.userSpecifiedRewriteCssImports || (_nullishCoalesce(initialTwPatcher.majorVersion, () => ( 0))) >= 4);
|
|
58
58
|
if (shouldRewriteCssImports) {
|
|
59
|
-
|
|
59
|
+
_chunk47NJZTIWjs.applyTailwindcssCssImportRewrite.call(void 0, compiler, {
|
|
60
60
|
pkgDir: weappTailwindcssPackageDir,
|
|
61
61
|
enabled: true
|
|
62
62
|
});
|
|
63
63
|
}
|
|
64
64
|
const runtimeState = {
|
|
65
65
|
twPatcher: initialTwPatcher,
|
|
66
|
-
patchPromise:
|
|
66
|
+
patchPromise: _chunkAXEKXGG7js.createTailwindPatchPromise.call(void 0, initialTwPatcher),
|
|
67
67
|
refreshTailwindcssPatcher
|
|
68
68
|
};
|
|
69
69
|
const refreshRuntimeState = async (force) => {
|
|
70
|
-
await
|
|
70
|
+
await _chunkAXEKXGG7js.refreshTailwindRuntimeState.call(void 0, runtimeState, force);
|
|
71
71
|
};
|
|
72
72
|
const { Compilation, sources, NormalModule } = compiler.webpack;
|
|
73
73
|
const { ConcatSource } = sources;
|
|
74
74
|
async function getClassSetInLoader() {
|
|
75
75
|
await refreshRuntimeState(true);
|
|
76
76
|
await runtimeState.patchPromise;
|
|
77
|
-
await
|
|
77
|
+
await _chunkAXEKXGG7js.collectRuntimeClassSet.call(void 0, runtimeState.twPatcher, { force: true, skipRefresh: true });
|
|
78
78
|
}
|
|
79
79
|
onLoad();
|
|
80
80
|
const loader = _nullishCoalesce(runtimeLoaderPath, () => ( _path2.default.resolve(__dirname, "./weapp-tw-runtime-loader.js")));
|
|
81
81
|
const isExisted = _fs2.default.existsSync(loader);
|
|
82
|
-
const
|
|
82
|
+
const runtimeLoaderRewriteOptions = shouldRewriteCssImports ? {
|
|
83
|
+
pkgDir: weappTailwindcssPackageDir
|
|
84
|
+
} : void 0;
|
|
85
|
+
const runtimeLoaderOptions = {
|
|
86
|
+
getClassSet: getClassSetInLoader,
|
|
87
|
+
rewriteCssImports: runtimeLoaderRewriteOptions
|
|
88
|
+
};
|
|
89
|
+
const createRuntimeLoaderEntry = () => ({
|
|
83
90
|
loader,
|
|
84
|
-
options:
|
|
85
|
-
getClassSet: getClassSetInLoader
|
|
86
|
-
},
|
|
91
|
+
options: runtimeLoaderOptions,
|
|
87
92
|
ident: null,
|
|
88
93
|
type: null
|
|
89
|
-
};
|
|
90
|
-
compiler.hooks.compilation.tap(
|
|
91
|
-
NormalModule.getCompilationHooks(compilation).loader.tap(
|
|
94
|
+
});
|
|
95
|
+
compiler.hooks.compilation.tap(_chunkAXEKXGG7js.pluginName, (compilation) => {
|
|
96
|
+
NormalModule.getCompilationHooks(compilation).loader.tap(_chunkAXEKXGG7js.pluginName, (_loaderContext, module) => {
|
|
92
97
|
if (isExisted) {
|
|
93
98
|
const idx = module.loaders.findIndex((x) => x.loader.includes("postcss-loader"));
|
|
99
|
+
const runtimeLoaderEntry = createRuntimeLoaderEntry();
|
|
94
100
|
if (idx > -1) {
|
|
95
|
-
module.loaders.
|
|
101
|
+
module.loaders.splice(idx + 1, 0, runtimeLoaderEntry);
|
|
102
|
+
} else {
|
|
103
|
+
module.loaders.push(runtimeLoaderEntry);
|
|
96
104
|
}
|
|
97
105
|
}
|
|
98
106
|
});
|
|
99
107
|
compilation.hooks.processAssets.tapPromise(
|
|
100
108
|
{
|
|
101
|
-
name:
|
|
109
|
+
name: _chunkAXEKXGG7js.pluginName,
|
|
102
110
|
stage: Compilation.PROCESS_ASSETS_STAGE_SUMMARIZE
|
|
103
111
|
},
|
|
104
112
|
async (assets) => {
|
|
@@ -116,13 +124,13 @@ var UnifiedWebpackPluginV5 = class {
|
|
|
116
124
|
const jsAssets = /* @__PURE__ */ new Map();
|
|
117
125
|
for (const [file] of entries) {
|
|
118
126
|
if (this.options.jsMatcher(file) || this.options.wxsMatcher(file)) {
|
|
119
|
-
const absolute =
|
|
127
|
+
const absolute = _chunkK234IGOTjs.toAbsoluteOutputPath.call(void 0, file, outputDir);
|
|
120
128
|
jsAssets.set(absolute, file);
|
|
121
129
|
}
|
|
122
130
|
}
|
|
123
131
|
const moduleGraphOptions = {
|
|
124
132
|
resolve(specifier, importer) {
|
|
125
|
-
return
|
|
133
|
+
return _chunkK234IGOTjs.resolveOutputSpecifier.call(void 0, specifier, importer, outputDir, (candidate) => jsAssets.has(candidate));
|
|
126
134
|
},
|
|
127
135
|
load: (id) => {
|
|
128
136
|
const assetName = jsAssets.get(id);
|
|
@@ -167,7 +175,7 @@ var UnifiedWebpackPluginV5 = class {
|
|
|
167
175
|
const groupedEntries = _chunkUW3WHSZ5js.getGroupedEntries.call(void 0, entries, this.options);
|
|
168
176
|
await refreshRuntimeState(true);
|
|
169
177
|
await runtimeState.patchPromise;
|
|
170
|
-
const runtimeSet = await
|
|
178
|
+
const runtimeSet = await _chunkAXEKXGG7js.collectRuntimeClassSet.call(void 0, runtimeState.twPatcher, { force: true, skipRefresh: true });
|
|
171
179
|
debug("get runtimeSet, class count: %d", runtimeSet.size);
|
|
172
180
|
const tasks = [];
|
|
173
181
|
if (Array.isArray(groupedEntries.html)) {
|
|
@@ -204,12 +212,12 @@ var UnifiedWebpackPluginV5 = class {
|
|
|
204
212
|
const jsTaskFactories = [];
|
|
205
213
|
if (Array.isArray(groupedEntries.js)) {
|
|
206
214
|
for (const [file] of groupedEntries.js) {
|
|
207
|
-
const cacheKey =
|
|
215
|
+
const cacheKey = _chunk47NJZTIWjs.getCacheKey.call(void 0, file);
|
|
208
216
|
const asset = compilation.getAsset(file);
|
|
209
217
|
if (!asset) {
|
|
210
218
|
continue;
|
|
211
219
|
}
|
|
212
|
-
const absoluteFile =
|
|
220
|
+
const absoluteFile = _chunkK234IGOTjs.toAbsoluteOutputPath.call(void 0, file, outputDir);
|
|
213
221
|
const initialSource = asset.source.source();
|
|
214
222
|
const initialRawSource = typeof initialSource === "string" ? initialSource : initialSource.toString();
|
|
215
223
|
jsTaskFactories.push(async () => {
|
|
@@ -284,7 +292,7 @@ var UnifiedWebpackPluginV5 = class {
|
|
|
284
292
|
);
|
|
285
293
|
}
|
|
286
294
|
}
|
|
287
|
-
|
|
295
|
+
_chunkK234IGOTjs.pushConcurrentTaskFactories.call(void 0, tasks, jsTaskFactories);
|
|
288
296
|
await Promise.all(tasks);
|
|
289
297
|
debug("end");
|
|
290
298
|
onEnd();
|