-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Handle chunks with empty modules
Closes #22
- Loading branch information
Showing
5 changed files
with
105 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
{ | ||
"errors": [], | ||
"warnings": [], | ||
"version": "1.15.0", | ||
"hash": "9184c60078374c771f6c", | ||
"time": 16625, | ||
"publicPath": "http://localhost:8000/", | ||
"assetsByChunkName": { | ||
"commons": ["commons.js", "commons.js.map"] | ||
}, | ||
"assets": [ | ||
{ | ||
"name": "commons.js", | ||
"size": 3797689, | ||
"chunks": [0], | ||
"chunkNames": ["commons"], | ||
"emitted": true | ||
} | ||
], | ||
"chunks": [ | ||
{ | ||
"id": 0, | ||
"rendered": true, | ||
"initial": true, | ||
"entry": true, | ||
"extraAsync": false, | ||
"size": 3492266, | ||
"names": ["commons"], | ||
"files": ["commons.js", "commons.js.map"], | ||
"hash": "5088ce796a9301f64f06", | ||
"parents": [] | ||
} | ||
], | ||
"modules": [ | ||
{ | ||
"id": "module1", | ||
"name": "module-name", | ||
"size": 500, | ||
"reasons": [] | ||
} | ||
], | ||
"filteredModules": 0, | ||
"children": [] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Snapshot report for `lib/__tests__/analyze.js` | ||
|
||
The actual snapshot is saved in `analyze.js.snap`. | ||
|
||
Generated by [AVA](https://ava.li). | ||
|
||
## should handle stats file with a chunk which has empty modules | ||
|
||
> Snapshot 1 | ||
{ | ||
chunks: { | ||
0: { | ||
id: 0, | ||
names: [ | ||
'commons', | ||
], | ||
size: 3492266, | ||
}, | ||
}, | ||
modules: [ | ||
{ | ||
chunks: undefined, | ||
deps: 0, | ||
depsChains: [], | ||
imported: 0, | ||
name: 'module-name', | ||
reasons: [], | ||
size: 500, | ||
type: 'file', | ||
}, | ||
], | ||
} |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters