mirror of
https://github.com/hanzoai/next.js.git
synced 2026-10-30 14:46:38 +00:00
Removes `__` prefix and ensures it's available on client/server as expected. x-ref: [slack thread](https://vercel.slack.com/archives/C04TNLL0LSK/p1687197571572119)
25 lines
568 B
TypeScript
25 lines
568 B
TypeScript
import testImage from '../public/test.jpg'
|
|
import Image from 'next/image'
|
|
import styles from './styles.module.css'
|
|
|
|
export default function Page() {
|
|
return (
|
|
<>
|
|
<p className={styles.template}>hello pages</p>
|
|
<p id="deploymentId">{process.env.NEXT_DEPLOYMENT_ID}</p>
|
|
<Image src={testImage} alt="test image" />
|
|
|
|
<button
|
|
onClick={() => {
|
|
import('../data').then((mod) => {
|
|
console.log('loaded data', mod)
|
|
})
|
|
}}
|
|
id="dynamic-import"
|
|
>
|
|
click me
|
|
</button>
|
|
</>
|
|
)
|
|
}
|