Package containing the bug
I’m not sure
Describe the bug
I'm an experienced Drupal dev but I'm not that familiar with NextJS. My site is at http://127.0.0.1/drupal_bootstrap/web but I had to add this URL replacement hack to lib/drupal.js to get both the main and individual node pages to load:
import { NextDrupal } from "next-drupal"
const baseUrl = 'http://127.0.0.1/drupal_bootstrap/web'
const clientId = process.env.DRUPAL_CLIENT_ID as string
const clientSecret = process.env.DRUPAL_CLIENT_SECRET as string
export const drupal = new NextDrupal(
baseUrl,
{
fetcher: async (url, options) => {
url = url
.replace(
'http://127.0.0.1/jsonapi',
'http://127.0.0.1/drupal_bootstrap/web/jsonapi'
)
.replace(
'http://127.0.0.1/router',
'http://127.0.0.1/drupal_bootstrap/web/router'
);
return fetch(url, options);
}
}
);
Am I doing something wrong, or are sites in subdirectories not supported?
Package containing the bug
I’m not sure
Describe the bug
I'm an experienced Drupal dev but I'm not that familiar with NextJS. My site is at http://127.0.0.1/drupal_bootstrap/web but I had to add this URL replacement hack to lib/drupal.js to get both the main and individual node pages to load:
Am I doing something wrong, or are sites in subdirectories not supported?