Skip to content

Commit

Permalink
Fix missing interpolation on next/head exports
Browse files Browse the repository at this point in the history
fixes #36183
  • Loading branch information
Brooooooklyn committed Apr 26, 2022
1 parent 994f182 commit fee601b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/next/head.js
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,23 @@ describe('Type module interop', () => {
files: {
'pages/index.js': `
import Link from 'next/link'
import Head from 'next/head'
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

0 comments on commit fee601b

Please sign in to comment.