pageExtensions error on initial try
See original GitHub issueHello 👋🏾
First off, thank you for creating this package as it’s currently exactly what we’re looking for in the application our company is working on.
I’m not sure if this is the correct place for this type of question but I couldn’t find any related Slack channel so I’ll leave this here until told otherwise.
My issue
I’m having a really hard time configuring the next-multilingual
package. I have now tried both configurations (simple & advanced). I’ve followed through the whole configuration flow as shown on the README file.
In both cases, the result is as shown in the screenshot below 👇🏾
My understanding is that the pageExtensions
parameter in the configurations takes into account the file extensions used by the pages in our application. At the moment, all pages in our app have a .jsx
extension… which shouldn’t really cause the condition to set off this error.
I may be overlooking or underthinking something here, any insight would be really helpful. Thanks 😊
Below I’m attaching how our next.config.js
file looks like
const { MulConfig } = require("next-multilingual/config");
const mulConfig = new MulConfig("testerApp", [
"nl-NL",
"en-NL",
"nl-BE",
"en-BE",
"en-GB",
]);
/*const STUDIO_REWRITE = {
source: "/studio/:path*",
destination:
process.env.NODE_ENV === "development"
? "http://localhost:3333/studio/:path*"
: "/studio/index.html",
};*/
module.exports = {
/* rewrites: () => [STUDIO_REWRITE], */
trailingSlash: true,
images: {
domains: ["ibb.co"],
},
i18n: {
locales: mulConfig.getUrlLocalePrefixes(),
defaultLocale: mulConfig.getDefaultUrlLocalePrefix(),
},
poweredByHeader: false,
webpack(config, { isServer }) {
if (isServer) {
config.resolve.alias["next-multilingual/link$"] = require.resolve(
"next-multilingual/link/ssr"
);
}
return config;
},
async rewrites() {
return mulConfig.getRewrites();
},
async redirects() {
return mulConfig.getRedirects();
},
};
Issue Analytics
- State:
- Created 2 years ago
- Comments:11 (6 by maintainers)
@nbouvrette Using npm, version 7.12.1.
Macbook --> Mac Big Sur version 11.5.2
Awesome, keep us posted - our goal is to make this one of the best i18n packages around 😃