Issue 1:
Bug report

Describe the bug

When using Webpack's magic comment (/* webpackChunkName: "balabala" */) to specify several modules bundling into one chunck, the output html contains duplicated <link rel='preload'> and <script> for the same chunck

To Reproduce

a simple respository to reproduce the bug:

https://github.com/xboy2012/nextjs-duplicate-dynamic-reproduce

In the respository I defined two modules, Module1 and Module2, using /* webpackChunkName: "allModules" */ to make them bundling into chunck allModules.

Just execute npm run dev, open http://localhost:3000/ in your browser.

Inspect the result HTML, then you'll see duplicated <link rel='preload'> and <script> such as follows:

<!DOCTYPE html>
<html>
<head>
<meta charSet="utf-8" class="next-head"/>
<meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1" class="next-head"/>
<link rel="preload" href="/_next/static/development/pages/index.js?ts=1558408463129" as="script"/>
<link rel="preload" href="/_next/static/development/pages/_app.js?ts=1558408463129" as="script"/>
<link rel="preload" href="/_next/static/chunks/allModules.js?ts=1558408463129" as="script"/>
<link rel="preload" href="/_next/static/chunks/allModules.js?ts=1558408463129" as="script"/>
<link rel="preload" href="/_next/static/runtime/webpack.js?ts=1558408463129" as="script"/>
<link rel="preload" href="/_next/static/runtime/main.js?ts=1558408463129" as="script"/>
</head>
<body>
<div id="__next">
<div>
<div>This is module1</div>
<div>This is module2</div>
</div>
</div>
<script src="/_next/static/development/dll/dll_2011977376de5c4d4cfb.js?ts=1558408463129"></script>
<script id="__NEXT_DATA__" type="application/json">
{"dataManager":"[]","props":{"pageProps":{}},"page":"/","query":{},"buildId":"development","dynamicBuildId":false,"dynamicIds":["./components/Module1.js","./components/Module1.js"]}
</script>
<script async="" id="__NEXT_PAGE__/" src="/_next/static/development/pages/index.js?ts=1558408463129"></script>
<script async="" id="__NEXT_PAGE__/_app" src="/_next/static/development/pages/_app.js?ts=1558408463129"></script>
<script async="" src="/_next/static/chunks/allModules.js?ts=1558408463129"></script>
<script async="" src="/_next/static/chunks/allModules.js?ts=1558408463129"></script>
<script src="/_next/static/runtime/webpack.js?ts=1558408463129" async=""></script>
<script src="/_next/static/runtime/main.js?ts=1558408463129" async=""></script>
</body>
</html>

Obviously, allModules.js is preloaded and loaded twice.

Expected behavior

There should be no duplicated <link rel='preload'> and <script> for the same file.

Screenshots

See the above description

System information

OS: macOS

Browser Chrome

Version of Next.js:

I wrote the repository to reproduce the bug using Next 8.x

In my company project I face the same bug using Next 7.x

So it's likely all version have the bug

Additional context

Not yet.

Issue 2:
It seems that the PropTypes for the href prop of Link component doesn't expect an object instead of a URL string.

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

Expected Behavior

<Link href={{ pathname: '/', query: { id: 1 } }}><a>Test</a></Link>

This works fine, but a warning is raised:

Warning: Failed prop type: Invalid prop `href` of type `object` supplied to `Link`, expected `string`.

Your Environment

Tech
Version

next
3.0.1-beta.17

node
8.1.4

OS
Arch Linux

browser
Google Chrome (latest stable)