Issue 1:
Examples bug report

Example name

with-ant-design

Describe the bug

component can't navigate to previous one when refresh browser

To Reproduce

1, create about.js in pages folder, with code below

import React from 'react'
import Link from 'next/link'

export default () => {
return (
<div style={{ marginTop: 100 }}>
<div>
<Link href="/">
<a>index page</a>
</Link>
</div>
</div>
)
}

2, add a Link in index.js, such as:

<Link href="/about">
<a>about page</a>
</Link>

3, click link in index.js then it navigates to/about as expected

4, click link in about.js then it navigates to/ as expected

5, click link in index.js again then it navigates to /about again

6, refresh the browser

7, click link in about.js, it can't navigate to/ !

Expected behavior

click link in about.js, it can navigate to/ after refresh browser

Screenshots

nope

System information

OS: macos mojave

Browser chrome latest

Version of Next.js: latest

Additional context

no errors in browser console or terminal console

Issue 2:
I'm encountering a weird issue with either Babel or Next.js when trying to run TypeScript jest tests.

I can run the Jest test written in plain ol' JavaScript just fine, but the Footer.test.tsx file fails with an unexpected token import message:

`

PASS ./demo.test.js

FAIL components/Layout/Footer/Footer.test.tsx

● Test suite failed to run

/Users/rob/repos/crypto-insights/src/web/components/Layout/Footer/Footer.test.tsx:3
import { shallow } from 'enzyme'
^^^^^^

SyntaxError: Unexpected token import

at ScriptTransformer._transformAndBuildScript (node_modules/jest-runtime/build/script_transformer.js:318:17)

`

Using the Next.js examples with-jest and with-typescript, I've got the following configuration in place:

// tsconfig.json { "compilerOptions": { "jsx": "react-native", "module": "commonjs", "strict": true, "target": "es2017" } }

// .babelrc { "env": { "development": { "presets": ["next/babel"] }, "production": { "presets": ["next/babel"] }, "test": { "presets": [["next/babel", { "preset-env": { "modules": "commonjs" } }]] } } }

// jest.config.js module.exports = { setupFiles: ['<rootDir>/jest.setup.js'], testPathIgnorePatterns: ['<rootDir>/.next/', '<rootDir>/node_modules/'], testRegex: '\\.test\\.*', moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'], collectCoverageFrom: [ '!jest.setup.js', '**/*.{js,jsx,ts,tsx}', '!build/**', '!coverage/**' ] }

`// jest.setup.js

import { configure } from 'enzyme'

import Adapter from 'enzyme-adapter-react-16'

configure({ adapter: new Adapter() })

`

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

Expected Behavior

Shouldn't I be able to run my jest test written in TSX:

`// Footer.test.tsx

import { shallow } from 'enzyme'

import { Footer } from './Footer'

describe('Footer', () => {

it('should render', () => {

const wrapper = shallow(

)

expect(wrapper).toBeDefined()

})

})

`

Current Behavior

I can run the Jest test written in plain ol' JavaScript just fine, but the Footer.test.tsx file fails with an unexpected token import message:

`

PASS ./demo.test.js

FAIL components/Layout/Footer/Footer.test.tsx

● Test suite failed to run

/Users/rob/repos/crypto-insights/src/web/components/Layout/Footer/Footer.test.tsx:3
import { shallow } from 'enzyme'
^^^^^^

SyntaxError: Unexpected token import

at ScriptTransformer._transformAndBuildScript (node_modules/jest-runtime/build/script_transformer.js:318:17)

`

Any help would be appreciated. Thanks!!