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

React react-dom/server minified alias. (#1862)

That's simply because it has no effect since we don't run webpack on the server.
And for the server, file size difference doesn't matter a lot.
This commit is contained in:
Arunoda Susiripala 2017-05-03 13:59:21 -07:00 committed by GitHub
parent 24f3f143a6
commit ee9dba9ea7

View file

@ -299,10 +299,11 @@ export default async function createCompiler (dir, { dev = false, quiet = false,
} }
if (!dev) { if (!dev) {
// We do this to use the minified version of React in production.
// This will significant file size redution when turned off uglifyjs.
webpackConfig.resolve.alias = { webpackConfig.resolve.alias = {
'react': require.resolve('react/dist/react.min.js'), 'react': require.resolve('react/dist/react.min.js'),
'react-dom': require.resolve('react-dom/dist/react-dom.min.js'), 'react-dom': require.resolve('react-dom/dist/react-dom.min.js')
'react-dom/server': require.resolve('react-dom/dist/react-dom-server.min.js')
} }
} }