Issue 1:
React-i18n in Production

Expected Behavior

I'm struggling with a very strange bug on running the react-i18next with nextJS, it works perfectly on dev, but when I run it on production mode it crashes. The strange thing is that I created the configs based on the examples that are provided here, but it doesn't work on production mode, as doesn't find react under the i18n options object.

Current Behavior

On production I get this error the front-end

app.js:78 Cannot read property 'react' of undefined

TypeError: Cannot read property 'react' of undefined

at new l (http://localhost:3000/_next/65dbc4ba-ad42-4d43-b7bc-3bc411c9d184/page/:3:1740)

at d._constructComponentWithoutOwner (http://localhost:3000/_next/2ff3a5285f98c6920205133b0780e5fc/app.js:35:341292)

at d._constructComponent (http://localhost:3000/_next/2ff3a5285f98c6920205133b0780e5fc/app.js:35:341159)

at d.mountComponent (http://localhost:3000/_next/2ff3a5285f98c6920205133b0780e5fc/app.js:35:340341)

at Object.mountComponent (http://localhost:3000/_next/2ff3a5285f98c6920205133b0780e5fc/app.js:7:67596)

at d.performInitialMount (http://localhost:3000/_next/2ff3a5285f98c6920205133b0780e5fc/app.js:35:342114)

at d.mountComponent (http://localhost:3000/_next/2ff3a5285f98c6920205133b0780e5fc/app.js:35:341000)

at Object.mountComponent (http://localhost:3000/_next/2ff3a5285f98c6920205133b0780e5fc/app.js:7:67596)

at mountChildren (http://localhost:3000/_next/2ff3a5285f98c6920205133b0780e5fc/app.js:35:336860)

at m._createContentMarkup (http://localhost:3000/_next/2ff3a5285f98c6920205133b0780e5fc/app.js:35:325835)

Steps to Reproduce (for bugs)

1.next build

2.npm start

Context

Your Environment

Tech
Version

next
^3.0.1-beta.18

OS
MAC OS

browser
Chrome

Issue 2:
Bug report

There are duplicate chunks for the robot-bundle component. The component is lazy loaded with SSR: false.

This is the section of the react-loadable-manifest.json. You can see that 0zX2, 3at2 are duplicated.

Is that correct or what's the reason for this? There are also two chunks for the robot-bundle component on client side even though it's exactly the same component.

"../../components/robot-bundle": [
{
"id": "",
"name": null,
"file": "static/chunks/styles.7bcfa32fbdfd22ad0da9.js",
"publicPath": "static/chunks/styles.7bcfa32fbdfd22ad0da9.js"
},
{
"id": "0zX2",
"name": "../../node_modules/axios/lib/helpers/isURLSameOrigin.js",
"file": "static/chunks/9c13.c708e85ffab23caa575e.js",
"publicPath": "static/chunks/9c13.c708e85ffab23caa575e.js"
},
{
"id": "3at2",
"name": "../../node_modules/react-feather/dist/icons/eye.js",
"file": "static/chunks/9a93.ce32de670ed7dbc20850.js",
"publicPath": "static/chunks/9a93.ce32de670ed7dbc20850.js"
},
{
"id": "3at2",
"name": "../../node_modules/react-feather/dist/icons/eye.js",
"file": "static/chunks/0430.1e2bbca5ac8a0d8676d8.js",
"publicPath": "static/chunks/0430.1e2bbca5ac8a0d8676d8.js"
},
{
"id": "0zX2",
"name": "../../node_modules/axios/lib/helpers/isURLSameOrigin.js",
"file": "static/chunks/c2a8.27def4aa4c3e39bcd218.js",
"publicPath": "static/chunks/c2a8.27def4aa4c3e39bcd218.js"
}
],

Expected behavior

From my understanding I expect that there is only one chunk.

System information

OS: Ubuntu

Version of Next.js: 8.1.0