rsnext/packages/next/build/webpack/plugins/webpack-conformance-plugin/utils/utils.ts
Janicklas Ralph a17ace8eba
GranularChunks conformance check (#11710)
Adding a conformance plugin the make sure users don't undo the benefits of the granularChunks config.

The plugin makes sure that minSize, maxInitialRequests values aren't overridden. Also ensures the cacheGroups - vendors, framework, libs, common, shared are maintained.

The warning and error messages do not break the build with this change. They only display a message.

cc - @prateekbh, @atcastle
2020-05-20 06:40:23 +00:00

10 lines
181 B
TypeScript

const assert = require('assert').strict
export function deepEqual(a: any, b: any) {
try {
assert.deepStrictEqual(a, b)
return true
} catch (_) {
return false
}
}