Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

374
Views
NextJS - how to dynamically load different apps with dynamic routes

I have a multi-lingual application that I use exportPathMap but I want to transition to getStaticProps and getStaticPaths. My structure looks like so:

pages/[language]/[app-slug].js

However, [app-slug].js could be any of 20 different applications with unrelated code...

After reading caveats I thought, with pre-defining the getStaticPaths, I would be able to do:

-[language]
--[app1].js
--[app2].js
...

But it throws You cannot use different slug names for the same dynamic path ('app1' !== 'app2')

Is there any way to dynamically load the react app code based on path, or to have multiple dynamic files in one repo? (all static paths are known)

This similar answer to use query values won't work for my case, SEO and bundle size are top priorities.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!