how to import in next.config
See original GitHub issuei have this in my next.config.js
`const nextTranslate = require(“next-translate”);
module.exports = { images: { domains: [“cdn.ztona.org”], }, serverRuntimeConfig: { mySecret: “secret”, xauth: process.env.XAUTH, url: process.env.URL, }, publicRuntimeConfig: { // Will be available on both server and client staticFolder: “/static”, xauth: process.env.XAUTH, url: process.env.URL, siteName: process.env.SITE_NAME, }, };`
how i can import with nextTranslate() plugin please
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
next.config.js: Introduction
next.config.js is a regular Node.js module, not a JSON file. It gets used by the Next.js server and build ... Phases can be...
Read more >Support ESM in next.config.js - Stack Overflow
From Next.js 12, ES modules is now supported in the config file by renaming it to next.config.mjs . // next.config.mjs import withLess from ......
Read more >Import config values from next.config.js #23180 - GitHub
Is there any way of importing configuration values from next.config.js ? For example, I'd like to access the i18n defaultLocale value:.
Read more >How to use the next/config function in next - Snyk
How to use the next/config function in next · To help you get started, we've selected a few next examples, based on popular...
Read more >Nice imports with Next.js - Remy Sharp
Add the next.config.js file to your project then it needs to add to the webpack.config.resolve.alias object: const path = require('path'); ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
You need to create the file
i18n.js
in the root of the project with the next-translate configuration 😉@aralroca Thank you bro worked fine but i have another problem 😄
now i have inside pages/[category]/index.js and [single].jsx
if i switch lang to another i have new name space localhost:3000/ar
and i use router.query to fetch category name now system read “ar” as category , (router.query.category)
any hint how to fix it , i dont need to add name space at url or any idea about how to handle it 👯