INNER CODE UNIT · Go

cgWebpackChunkMaps

cc1a2b/JShunter · internal/jshunter/chunkgraph.go:272

func cgWebpackChunkMaps(body []byte) []ChunkRef {
	var out []ChunkRef
	for _, prop := range []string{"u", "miniCssF", "k"} {
		for _, cap := range cgCaptureAssignments(body, prop) {
			out = append(out, cgBuildChunkURLs(cap, "webpack."+prop)...)
		}
	}
	return out
}

// cgCapture is the literal and map material of one runtime assignment.
type cgCapture struct {
	literals []string
	maps     []map[string]string
}

// cgCaptureAssignments collects the right-hand side of every `<obj>.<prop>=`
// assignment, bounded so a hostile bundle cannot drive unbounded work.

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…