Skip to content

Commit

Permalink
adding conformance plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
prateekbh committed Jan 13, 2020
1 parent 88f73a7 commit 9104bf1
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions packages/next/build/webpack-config.ts
Expand Up @@ -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 = <T>(x: T | false) => x is T

Expand Down Expand Up @@ -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'),
Expand Down

0 comments on commit 9104bf1

Please sign in to comment.