Commit Graph

1 Commits

Author SHA1 Message Date
Qingyu Wang 8ab85e29bb feat: implement `module.generator.json.JSONParse`
For large `.json` modules, webpack will generate `JSON.parse` by default for
better performance. But there are some circumstances that `JSON.parse` is not a
good choice (e.g.: when doing AOT compilation).

Thus, a new generator option `module.generator.json.JSONParse` is added to
disable generating `JSON.parse` for `.json` module.

The default value is kept as `true` and can be opt-out by custom rules.

fix: #19319
2025-03-13 22:24:10 +08:00