Gerald Girard
31 May 2024
Git-Friendly Optimization of Webpack Asset Modules
When optimizing Webpack asset modules for Git, one must make sure that inlined XML files remain readable. One typical problem is that diffs in Git become unintelligible due to the loss of line breaks. Using raw-loader to maintain the original formatting and using custom loaders to maintain whitespace are two possible solutions. Readability can also be increased by using tools such as Prettier to prepare XML files consistently.