Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix missing interpolation on next/head exports #36435

Merged
merged 1 commit into from Apr 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion packages/next/head.js
@@ -1 +1,3 @@
module.exports = require('./dist/shared/lib/head')
var head = require('./dist/shared/lib/head')
Object.assign(head.default, head)
module.exports = head.default
13 changes: 13 additions & 0 deletions test/e2e/type-module-interop/index.test.ts
Expand Up @@ -12,10 +12,23 @@ describe('Type module interop', () => {
files: {
'pages/index.js': `
import Link from 'next/link'
import Head from 'next/head'
ijjk marked this conversation as resolved.
Show resolved Hide resolved
import Script from 'next/script'

export default function Page() {
return (
<>
<Head>
<title>This page has a title 🤔</title>
<meta charSet="utf-8" />
<meta name="viewport" content="initial-scale=1.0, width=device-width" />
</Head>
<Script
strategy="afterInteractive"
dangerouslySetInnerHTML={{
__html: 'console.log("hello world")',
}}
/>
<p>hello world</p>
<Link href="/modules">
<a id="link-to-module">link to module</a>
Expand Down