@rsdoctor/core 0.1.9 → 0.1.10

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.
@@ -121,10 +121,17 @@ function getModuleGraphByStats({ modules, chunks }, root, chunkGraph) {
121
121
  normal.depth === 0,
122
122
  import_types.SDK.ModuleKind.Normal
123
123
  );
124
- normal.chunks?.forEach((_chunkId) => {
125
- const chunk = chunkGraph.getChunkById(String(_chunkId));
126
- chunk && normalModule.addChunk(chunk);
127
- });
124
+ if (normal.chunks?.length) {
125
+ normal.chunks?.forEach((_chunkId) => {
126
+ const chunk = chunkGraph.getChunkById(String(_chunkId));
127
+ chunk && normalModule.addChunk(chunk);
128
+ });
129
+ } else {
130
+ data.chunks?.forEach((_chunkId) => {
131
+ const chunk = chunkGraph.getChunkById(String(_chunkId));
132
+ chunk && normalModule.addChunk(chunk);
133
+ });
134
+ }
128
135
  if (normal.source) {
129
136
  normalModule.setSource({
130
137
  transformed: Buffer.isBuffer(normal.source) ? normal.source.toString() : normal.source
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rsdoctor/core",
3
- "version": "0.1.9",
3
+ "version": "0.1.10",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/web-infra-dev/rsdoctor",
@@ -50,9 +50,9 @@
50
50
  "semver": "^7.5.4",
51
51
  "source-map": "^0.7.4",
52
52
  "webpack-bundle-analyzer": "^4.9.1",
53
- "@rsdoctor/graph": "0.1.9",
54
- "@rsdoctor/sdk": "0.1.9",
55
- "@rsdoctor/utils": "0.1.9"
53
+ "@rsdoctor/graph": "0.1.10",
54
+ "@rsdoctor/sdk": "0.1.10",
55
+ "@rsdoctor/utils": "0.1.10"
56
56
  },
57
57
  "devDependencies": {
58
58
  "@rspack/core": "0.5.1",
@@ -72,7 +72,7 @@
72
72
  "tslib": "2.4.1",
73
73
  "typescript": "^5.2.2",
74
74
  "webpack": "^5.89.0",
75
- "@rsdoctor/types": "0.1.9",
75
+ "@rsdoctor/types": "0.1.10",
76
76
  "@scripts/test-helper": "0.1.1"
77
77
  },
78
78
  "publishConfig": {