From 9104bf17437c71094888643957c0d6632412ec0a Mon Sep 17 00:00:00 2001 From: Prateek Bhatnagar Date: Mon, 13 Jan 2020 15:58:53 -0800 Subject: [PATCH] adding conformance plugin --- packages/next/build/webpack-config.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/packages/next/build/webpack-config.ts b/packages/next/build/webpack-config.ts index 528715fdd5a294e..af18cf03150fddc 100644 --- a/packages/next/build/webpack-config.ts +++ b/packages/next/build/webpack-config.ts @@ -44,6 +44,9 @@ import { ProfilingPlugin } from './webpack/plugins/profiling-plugin' import { ReactLoadablePlugin } from './webpack/plugins/react-loadable-plugin' import { ServerlessPlugin } from './webpack/plugins/serverless-plugin' import { TerserPlugin } from './webpack/plugins/terser-webpack-plugin/src/index' +import WebpackConformancePlugin, { + MinificationConformanceCheck, +} from './webpack/plugins/webpack-conformance-plugin' type ExcludesFalse = (x: T | false) => x is T @@ -533,6 +536,11 @@ export default async function getBaseWebpackConfig( }, }, }), + config.experimental.conformance && + !dev && + new WebpackConformancePlugin({ + tests: [new MinificationConformanceCheck()], + }), ].filter(Boolean), }, recordsPath: path.join(outputPath, 'records.json'),