diff --git a/cli/builder.js b/cli/builder.js index 9ebf9785..e3ee493a 100755 --- a/cli/builder.js +++ b/cli/builder.js @@ -96,6 +96,8 @@ export default function Page(p){ } Page = Object.assign(Page, { ...C }) + +export * from '${prefix}/${clearPageExt(page)}' ` } diff --git a/examples/static-site/pages_/index.tsx b/examples/static-site/pages_/index.tsx index bfd8aae7..6599c039 100644 --- a/examples/static-site/pages_/index.tsx +++ b/examples/static-site/pages_/index.tsx @@ -6,11 +6,14 @@ import useTranslation from 'next-translate/useTranslation' // @ts-ignore import Header from '../components/header' -export default function Home() { +// @ts-ignore +export default function Home(props) { const { t, lang } = useTranslation() const description = t('home:description') const linkName = t('home:more-examples') + console.log(props) + return ( <>
@@ -21,3 +24,7 @@ export default function Home() { ) } + +export const getStaticProps = async () => ({ + props: { getStaticPropsWorks: true }, +}) diff --git a/examples/with-server/components/header.js b/examples/with-server/components/header.js index 566e8a74..6ee647dc 100644 --- a/examples/with-server/components/header.js +++ b/examples/with-server/components/header.js @@ -3,7 +3,7 @@ import Head from 'next/Head' import Link from 'next/link' import useTranslation from 'next-translate/useTranslation' -import styles from 'header.module.css' +import styles from './header.module.css' export default function Header() { const { t, lang } = useTranslation() diff --git a/package.json b/package.json index 86fb289b..a277d0ae 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "next-translate", - "version": "0.10.5", + "version": "0.10.6", "description": "Next.js utility to translate pages without the need of a server (static i18n pages generator).", "license": "MIT", "keywords": [