drunomics / nuxtjs-drupal-ce

A Nuxt module to easily connect Drupal via custom elements.
https://lupus-decoupled.org/
MIT License
22 stars 4 forks source link

Changes to drupalBaseUrl are sometimes not taken into account #205

Closed fago closed 3 months ago

fago commented 3 months ago

Steps to reproduce

Expected: override of NUXT_PUBLIC_DRUPAL_CE_DRUPAL_BASE_URL applies Actual result: defined baseUrl applies

Problems I see:

fago commented 3 months ago

As discussed in the frontend-squad round:

  function getMenuBaseUrl {    
    return menuBaseUrl ?? getDrupalBaseURl() + menuEndpoint
  }

  function getDrupalBaseUrl() {
    return nuxt-is-server && serverDrupalBaseUrl  ? serverDrupalBaseUrl : drupalBaseUrl
  }

-> we use that helpers everywhere, in the composable and in the server routes.

fago commented 3 months ago

example for moving config to runtimeconfig: nuxt-auth-utils