1
0
Fork 0
mirror of https://github.com/terribleplan/next.js.git synced 2024-01-19 02:48:18 +00:00

Remove ignore plugin from webpack build flow (#5394)

This commit is contained in:
Vasyl Berezovyy 2018-10-20 17:59:43 +03:00 committed by Tim Neutkens
parent 4be4452fd8
commit 9a09de2feb

View file

@ -257,16 +257,6 @@ export default async function getBaseWebpackConfig (dir: string, {dev = false, i
name: isServer ? 'server' : 'client'
}),
dev && !isServer && new FriendlyErrorsWebpackPlugin(),
new webpack.IgnorePlugin(/(precomputed)/, /node_modules.+(elliptic)/),
// This removes prop-types-exact in production, as it's not used there.
!dev && new webpack.IgnorePlugin({
checkResource: (resource) => {
return /prop-types-exact/.test(resource)
},
checkContext: (context) => {
return context.indexOf(NEXT_PROJECT_ROOT_DIST) !== -1
}
}),
// Even though require.cache is server only we have to clear assets from both compilations
// This is because the client compilation generates the build manifest that's used on the server side
dev && new NextJsRequireCacheHotReloader(),