You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The reason will be displayed to describe this comment to others. Learn more.
This is a breaking change right?
In my module, I was relying on the presence of this.nuxt.options.server to pass the server info to the template I would be adding via this.addTemplate. Now, during the build, these options are not present. Only during npm run start, the server value is available but by then the nuxt files are already generated with the server set to false.
What would be other way to get server values in the template file?
The reason will be displayed to describe this comment to others. Learn more.
Hi @pi0 I cannot share the module code. But essentially, the module was creating a server middleware endpoint and registering a store. In the store's action, it was using the server options information to formulate the URL to the servermiddleware endpoint. I guess this is indeed a unique use case for us. Since, we have different domains pointing to the same Nuxt instance, so we needed to make a request to the local server on the server side. But we have now fixed it in a different way.
95e043f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a breaking change right?
In my module, I was relying on the presence of
this.nuxt.options.server
to pass the server info to the template I would be adding viathis.addTemplate
. Now, during the build, these options are not present. Only duringnpm run start
, the server value is available but by then the nuxt files are already generated with theserver
set tofalse
.What would be other way to get server values in the template file?
95e043f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @prashantpalikhe. Hmm that seems a strange use case because server config can be different after build... Can you probably ref to module code?
95e043f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @pi0 I cannot share the module code. But essentially, the module was creating a server middleware endpoint and registering a store. In the store's action, it was using the server options information to formulate the URL to the servermiddleware endpoint. I guess this is indeed a unique use case for us. Since, we have different domains pointing to the same Nuxt instance, so we needed to make a request to the local server on the server side. But we have now fixed it in a different way.