2021-10-21 13:14:57 +02:00
|
|
|
import value from 'http://localhost:12345/value1.js'
|
|
|
|
|
2021-10-25 01:54:16 +02:00
|
|
|
const url = new URL(
|
|
|
|
'https://github.com/vercel/next.js/raw/canary/test/integration/production/public/vercel.png?_=ssg',
|
|
|
|
import.meta.url
|
|
|
|
)
|
|
|
|
|
2021-10-21 13:14:57 +02:00
|
|
|
export async function getStaticProps() {
|
|
|
|
return {
|
|
|
|
props: {
|
|
|
|
value,
|
2021-10-25 01:54:16 +02:00
|
|
|
url: url.pathname,
|
2021-10-21 13:14:57 +02:00
|
|
|
},
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-10-25 01:54:16 +02:00
|
|
|
export default function Index({ value: staticValue, url: staticUrl }) {
|
2021-10-21 13:14:57 +02:00
|
|
|
return (
|
|
|
|
<div>
|
2021-10-25 01:54:16 +02:00
|
|
|
Hello {staticValue}+{value}+{staticUrl}+{url.pathname}
|
2021-10-21 13:14:57 +02:00
|
|
|
</div>
|
|
|
|
)
|
|
|
|
}
|