@rspack/binding 0.2.1 → 0.2.2
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/binding.d.ts +54 -17
- package/package.json +10 -10
package/binding.d.ts
CHANGED
|
@@ -35,6 +35,7 @@ export class JsCompilation {
|
|
|
35
35
|
addContextDependencies(deps: Array<string>): void
|
|
36
36
|
addMissingDependencies(deps: Array<string>): void
|
|
37
37
|
addBuildDependencies(deps: Array<string>): void
|
|
38
|
+
rebuildModule(moduleIdentifiers: Array<string>, f: (...args: any[]) => any): void
|
|
38
39
|
}
|
|
39
40
|
|
|
40
41
|
export class JsStats {
|
|
@@ -384,12 +385,42 @@ export interface PathWithInfo {
|
|
|
384
385
|
info: JsAssetInfo
|
|
385
386
|
}
|
|
386
387
|
|
|
387
|
-
export interface
|
|
388
|
+
export interface RawAssetGeneratorDataUrl {
|
|
389
|
+
type: "options"
|
|
390
|
+
options?: RawAssetGeneratorDataUrlOptions
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
export interface RawAssetGeneratorDataUrlOptions {
|
|
394
|
+
encoding?: "base64" | "false" | undefined
|
|
395
|
+
mimetype?: string
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
export interface RawAssetGeneratorOptions {
|
|
399
|
+
filename?: string
|
|
400
|
+
publicPath?: string
|
|
401
|
+
dataUrl?: RawAssetGeneratorDataUrl
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
export interface RawAssetInlineGeneratorOptions {
|
|
405
|
+
dataUrl?: RawAssetGeneratorDataUrl
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
export interface RawAssetParserDataUrl {
|
|
409
|
+
type: "options"
|
|
410
|
+
options?: RawAssetParserDataUrlOptions
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
export interface RawAssetParserDataUrlOptions {
|
|
388
414
|
maxSize?: number
|
|
389
415
|
}
|
|
390
416
|
|
|
391
417
|
export interface RawAssetParserOptions {
|
|
392
|
-
dataUrlCondition?:
|
|
418
|
+
dataUrlCondition?: RawAssetParserDataUrl
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
export interface RawAssetResourceGeneratorOptions {
|
|
422
|
+
filename?: string
|
|
423
|
+
publicPath?: string
|
|
393
424
|
}
|
|
394
425
|
|
|
395
426
|
export interface RawBannerCondition {
|
|
@@ -441,7 +472,7 @@ export interface RawCacheGroupOptions {
|
|
|
441
472
|
priority?: number
|
|
442
473
|
test?: string
|
|
443
474
|
/** What kind of chunks should be selected. */
|
|
444
|
-
chunks?:
|
|
475
|
+
chunks?: RegExp | 'async' | 'initial' | 'all'
|
|
445
476
|
minChunks?: number
|
|
446
477
|
minSize?: number
|
|
447
478
|
maxSize?: number
|
|
@@ -504,7 +535,7 @@ export interface RawEntryItem {
|
|
|
504
535
|
|
|
505
536
|
export interface RawExperiments {
|
|
506
537
|
lazyCompilation: boolean
|
|
507
|
-
incrementalRebuild:
|
|
538
|
+
incrementalRebuild: RawIncrementalRebuild
|
|
508
539
|
asyncWebAssembly: boolean
|
|
509
540
|
newSplitChunks: boolean
|
|
510
541
|
css: boolean
|
|
@@ -546,13 +577,20 @@ export interface RawExternalsPresets {
|
|
|
546
577
|
}
|
|
547
578
|
|
|
548
579
|
export interface RawFallbackCacheGroupOptions {
|
|
549
|
-
chunks?:
|
|
580
|
+
chunks?: RegExp | 'async' | 'initial' | 'all'
|
|
550
581
|
minSize?: number
|
|
551
582
|
maxSize?: number
|
|
552
583
|
maxAsyncSize?: number
|
|
553
584
|
maxInitialSize?: number
|
|
554
585
|
}
|
|
555
586
|
|
|
587
|
+
export interface RawGeneratorOptions {
|
|
588
|
+
type: "asset" | "asset/inline" | "asset/resource" | "unknown"
|
|
589
|
+
asset?: RawAssetGeneratorOptions
|
|
590
|
+
assetInline?: RawAssetInlineGeneratorOptions
|
|
591
|
+
assetResource?: RawAssetResourceGeneratorOptions
|
|
592
|
+
}
|
|
593
|
+
|
|
556
594
|
export interface RawGlobOptions {
|
|
557
595
|
caseSensitiveMatch?: boolean
|
|
558
596
|
dot?: boolean
|
|
@@ -582,6 +620,11 @@ export interface RawHtmlPluginConfig {
|
|
|
582
620
|
meta?: Record<string, Record<string, string>>
|
|
583
621
|
}
|
|
584
622
|
|
|
623
|
+
export interface RawIncrementalRebuild {
|
|
624
|
+
make: boolean
|
|
625
|
+
emitAsset: boolean
|
|
626
|
+
}
|
|
627
|
+
|
|
585
628
|
export interface RawLibraryAuxiliaryComment {
|
|
586
629
|
root?: string
|
|
587
630
|
commonjs?: string
|
|
@@ -612,7 +655,8 @@ export interface RawMinification {
|
|
|
612
655
|
|
|
613
656
|
export interface RawModuleOptions {
|
|
614
657
|
rules: Array<RawModuleRule>
|
|
615
|
-
parser?: RawParserOptions
|
|
658
|
+
parser?: Record<string, RawParserOptions>
|
|
659
|
+
generator?: Record<string, RawGeneratorOptions>
|
|
616
660
|
}
|
|
617
661
|
|
|
618
662
|
export interface RawModuleRule {
|
|
@@ -629,8 +673,8 @@ export interface RawModuleRule {
|
|
|
629
673
|
sideEffects?: boolean
|
|
630
674
|
use?: Array<RawModuleRuleUse>
|
|
631
675
|
type?: string
|
|
632
|
-
parser?:
|
|
633
|
-
generator?:
|
|
676
|
+
parser?: RawParserOptions
|
|
677
|
+
generator?: RawGeneratorOptions
|
|
634
678
|
resolve?: RawResolveOptions
|
|
635
679
|
issuer?: RawRuleSetCondition
|
|
636
680
|
dependency?: RawRuleSetCondition
|
|
@@ -642,14 +686,6 @@ export interface RawModuleRule {
|
|
|
642
686
|
enforce?: 'pre' | 'post'
|
|
643
687
|
}
|
|
644
688
|
|
|
645
|
-
export interface RawModuleRuleGenerator {
|
|
646
|
-
filename?: string
|
|
647
|
-
}
|
|
648
|
-
|
|
649
|
-
export interface RawModuleRuleParser {
|
|
650
|
-
dataUrlCondition?: RawAssetParserDataUrlOption
|
|
651
|
-
}
|
|
652
|
-
|
|
653
689
|
/**
|
|
654
690
|
* `loader` is for js side loader, `builtin_loader` is for rust side loader,
|
|
655
691
|
* which is mapped to real rust side loader by [get_builtin_loader].
|
|
@@ -746,6 +782,7 @@ export interface RawOutputOptions {
|
|
|
746
782
|
}
|
|
747
783
|
|
|
748
784
|
export interface RawParserOptions {
|
|
785
|
+
type: "asset" | "unknown"
|
|
749
786
|
asset?: RawAssetParserOptions
|
|
750
787
|
}
|
|
751
788
|
|
|
@@ -861,7 +898,7 @@ export interface RawSplitChunksOptions {
|
|
|
861
898
|
name?: string
|
|
862
899
|
cacheGroups?: Record<string, RawCacheGroupOptions>
|
|
863
900
|
/** What kind of chunks should be selected. */
|
|
864
|
-
chunks?:
|
|
901
|
+
chunks?: RegExp | 'async' | 'initial' | 'all'
|
|
865
902
|
maxAsyncRequests?: number
|
|
866
903
|
maxInitialRequests?: number
|
|
867
904
|
minChunks?: number
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rspack/binding",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Node binding for rspack",
|
|
6
6
|
"main": "binding.js",
|
|
@@ -22,15 +22,15 @@
|
|
|
22
22
|
"binaryName": "rspack"
|
|
23
23
|
},
|
|
24
24
|
"optionalDependencies": {
|
|
25
|
-
"@rspack/binding-darwin-arm64": "0.2.
|
|
26
|
-
"@rspack/binding-win32-arm64-msvc": "0.2.
|
|
27
|
-
"@rspack/binding-linux-arm64-gnu": "0.2.
|
|
28
|
-
"@rspack/binding-linux-arm64-musl": "0.2.
|
|
29
|
-
"@rspack/binding-win32-ia32-msvc": "0.2.
|
|
30
|
-
"@rspack/binding-darwin-x64": "0.2.
|
|
31
|
-
"@rspack/binding-win32-x64-msvc": "0.2.
|
|
32
|
-
"@rspack/binding-linux-x64-gnu": "0.2.
|
|
33
|
-
"@rspack/binding-linux-x64-musl": "0.2.
|
|
25
|
+
"@rspack/binding-darwin-arm64": "0.2.2",
|
|
26
|
+
"@rspack/binding-win32-arm64-msvc": "0.2.2",
|
|
27
|
+
"@rspack/binding-linux-arm64-gnu": "0.2.2",
|
|
28
|
+
"@rspack/binding-linux-arm64-musl": "0.2.2",
|
|
29
|
+
"@rspack/binding-win32-ia32-msvc": "0.2.2",
|
|
30
|
+
"@rspack/binding-darwin-x64": "0.2.2",
|
|
31
|
+
"@rspack/binding-win32-x64-msvc": "0.2.2",
|
|
32
|
+
"@rspack/binding-linux-x64-gnu": "0.2.2",
|
|
33
|
+
"@rspack/binding-linux-x64-musl": "0.2.2"
|
|
34
34
|
},
|
|
35
35
|
"scripts": {
|
|
36
36
|
"build:debug": "node scripts/build.js",
|