Issue 1:
I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior

import getConfig from 'next/config' should work in accordance w/ readme

Current Behavior

Running now (and next build) produces the following build error

> Failed to build
> { Error: (client) ./config/env.ts
> Module not found: Error: Can't resolve 'node_modules/next/config.js' in '/home/nowuser/src/config'
> resolve 'node_modules/next/config.js' in '/home/nowuser/src/config'
> Parsed request is a module
> using description file: /home/nowuser/src/package.json (relative path: ./config)
> Field 'browser' doesn't contain a valid alias configuration
> after using description file: /home/nowuser/src/package.json (relative path: ./config)
> resolve as module
> looking for modules in /home/nowuser/src/node_modules/next/node_modules
> using description file: /home/nowuser/src/node_modules/next/package.json (relative path: ./node_modules)
> Field 'browser' doesn't contain a valid alias configuration
> after using description file: /home/nowuser/src/node_modules/next/package.json (relative path: ./node_modules)
> using description file: /home/nowuser/src/node_modules/next/package.json (relative path: ./node_modules/node_modules/next/config.js)
> no extension
> Field 'browser' doesn't contain a valid alias configuration
> /home/nowuser/src/node_modules/next/node_modules/node_modules/next/config.js doesn't exist
> .js
> Field 'browser' doesn't contain a valid alias configuration
> /home/nowuser/src/node_modules/next/node_modules/node_modules/next/config.js.js doesn't exist
> .jsx
> Field 'browser' doesn't contain a valid alias configuration
> /home/nowuser/src/node_modules/next/node_modules/node_modules/next/config.js.jsx doesn't exist
> .json
> Field 'browser' doesn't contain a valid alias configuration
> /home/nowuser/src/node_modules/next/node_modules/node_modules/next/config.js.json doesn't exist
> .ts
> Field 'browser' doesn't contain a valid alias configuration
> /home/nowuser/src/node_modules/next/node_modules/node_modules/next/config.js.ts doesn't exist
> .tsx
> Field 'browser' doesn't contain a valid alias configuration
> /home/nowuser/src/node_modules/next/node_modules/node_modules/next/config.js.tsx doesn't exist
> as directory
> /home/nowuser/src/node_modules/next/node_modules/node_modules/next/config.js doesn't exist
> /home/nowuser/src/config/node_modules doesn't exist or is not a directory
> /home/nowuser/node_modules doesn't exist or is not a directory
> /home/node_modules doesn't exist or is not a directory
> /node_modules doesn't exist or is not a directory
> looking for modules in /home/nowuser/src/node_modules
> using description file: /home/nowuser/src/package.json (relative path: ./node_modules)
> Field 'browser' doesn't contain a valid alias configuration
> after using description file: /home/nowuser/src/package.json (relative path: ./node_modules)
> using description file: /home/nowuser/src/package.json (relative path: ./node_modules/node_modules/next/config.js)
> no extension
> Field 'browser' doesn't contain a valid alias configuration
> /home/nowuser/src/node_modules/node_modules/next/config.js doesn't exist
> .js
> Field 'browser' doesn't contain a valid alias configuration
> /home/nowuser/src/node_modules/node_modules/next/config.js.js doesn't exist
> .jsx
> Field 'browser' doesn't contain a valid alias configuration
> /home/nowuser/src/node_modules/node_modules/next/config.js.jsx doesn't exist
> .json
> Field 'browser' doesn't contain a valid alias configuration
> /home/nowuser/src/node_modules/node_modules/next/config.js.json doesn't exist
> .ts
> Field 'browser' doesn't contain a valid alias configuration
> /home/nowuser/src/node_modules/node_modules/next/config.js.ts doesn't exist
> .tsx
> Field 'browser' doesn't contain a valid alias configuration
> /home/nowuser/src/node_modules/node_modules/next/config.js.tsx doesn't exist
> as directory
> /home/nowuser/src/node_modules/node_modules/next/config.js doesn't exist
> [/home/nowuser/src/node_modules/next/node_modules/node_modules/next/config.js]
> [/home/nowuser/src/node_modules/next/node_modules/node_modules/next/config.js.js]
> [/home/nowuser/src/node_modules/next/node_modules/node_modules/next/config.js.jsx]
> [/home/nowuser/src/node_modules/next/node_modules/node_modules/next/config.js.json]
> [/home/nowuser/src/node_modules/next/node_modules/node_modules/next/config.js.ts]
> [/home/nowuser/src/node_modules/next/node_modules/node_modules/next/config.js.tsx]
> [/home/nowuser/src/node_modules/next/node_modules/node_modules/next/config.js]
> [/home/nowuser/src/config/node_modules]
> [/home/nowuser/node_modules]
> [/home/node_modules]
> [/node_modules]
> [/home/nowuser/src/node_modules/node_modules/next/config.js]
> [/home/nowuser/src/node_modules/node_modules/next/config.js.js]
> [/home/nowuser/src/node_modules/node_modules/next/config.js.jsx]
> [/home/nowuser/src/node_modules/node_modules/next/config.js.json]
> [/home/nowuser/src/node_modules/node_modules/next/config.js.ts]
> [/home/nowuser/src/node_modules/node_modules/next/config.js.tsx]
> [/home/nowuser/src/node_modules/node_modules/next/config.js]
> @ ./config/env.ts 4:16-54
> @ ./config/index.ts
> @ ./pages-code/login/make-linkedin-url.ts
> @ ./pages/login.js
> @ multi ./pages/login.js
> at /home/nowuser/src/node_modules/next/dist/server/build/index.js:207:31
> at runWithDependencies (/home/nowuser/src/node_modules/webpack/lib/MultiCompiler.js:154:4)
> at /home/nowuser/src/node_modules/webpack/node_modules/async/dist/async.js:1126:9
> at /home/nowuser/src/node_modules/webpack/node_modules/async/dist/async.js:473:16
> at iteratorCallback (/home/nowuser/src/node_modules/webpack/node_modules/async/dist/async.js:1050:13)
> at /home/nowuser/src/node_modules/webpack/node_modules/async/dist/async.js:958:16
> at /home/nowuser/src/node_modules/webpack/node_modules/async/dist/async.js:1123:13
> at runCompilers (/home/nowuser/src/node_modules/webpack/lib/MultiCompiler.js:96:47)
> at fn (/home/nowuser/src/node_modules/webpack/lib/MultiCompiler.js:101:6)
> at compiler.run (/home/nowuser/src/node_modules/webpack/lib/MultiCompiler.js:150:5)
> at emitRecords.err (/home/nowuser/src/node_modules/webpack/lib/Compiler.js:265:13)
> at Compiler.emitRecords (/home/nowuser/src/node_modules/webpack/lib/Compiler.js:371:38)
> at emitAssets.err (/home/nowuser/src/node_modules/webpack/lib/Compiler.js:258:10)
> at applyPluginsAsyncSeries1.err (/home/nowuser/src/node_modules/webpack/lib/Compiler.js:364:12)
> at next (/home/nowuser/src/node_modules/tapable/lib/Tapable.js:218:11)
> at Compiler.compiler.plugin (/home/nowuser/src/node_modules/webpack/lib/performance/SizeLimitsPlugin.js:99:4)

Steps to Reproduce (for bugs)

add import getConfig from 'next/config' in a project using @zeit/next-typescript

next build

the error doesn't present in development

Context

I'm fairly new to typescript. a google shows this sort of error in different contexts, but the most common solution is to add ts to the webpack loader resolver. This is already done in next, though, so the solution is N/A.

I've also tried the following:

change file importing from next/config to a .js

import * as getConfig from 'next/config'

const getConfig = require('next/config')

import getConfig from '../node_modules/next/dist/lib/runtime-config.js'

Could this be b/c @types/next doesn't seem to have a config export?

Your Environment

Tech
Version

next
5.0.1-canary.10

node
on now, 8.9.4

OS
now

browser
na

@zeit/next-typescript
0.0.10

Issue 2:
Bug report

Describe the bug

In development mode, the entire application works fine, but in the production assembly, the main page is not initialized. I get html, index.js, but the react is not initialized

There are no errors in the console.

The problem is only on next@8, on next@7 there are no problems.

To Reproduce

I don't think I can repeat this case.

This problem appears on my computer and on the host machine.

Expected behavior

I expect that react will make hydration and start working.

Screenshots

On index page

On other pages

The screenshot shows that all the necessary scripts are connected to the page.

System information

OS: macOs/linux

Browser: chrome, safari, firefox

Version of Next.js: 8.01