-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: update Vue Storefront core packages to 2.5.7 #282
feat: update Vue Storefront core packages to 2.5.7 #282
Conversation
packages/theme/nuxt.config.js
Outdated
@@ -189,6 +188,7 @@ export default { | |||
{ code: 'USD', label: 'Dollar' }, | |||
{ code: 'EUR', label: 'Euro' } | |||
], | |||
backendUrl: process.env.BACKEND_URL | |||
backendUrl: process.env.BACKEND_URL, | |||
middlewareUrl: 'http://localhost:3000/api/' |
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.
Where is this used? It looks a bit tricky, we should at least use an env variable here + do some reasonable fallback
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.
It's one of the breaking changes - see here. Basically storefront expects this url now in the nuxt config instead of computing it on its own. We already use env variables for the middleware server config in the same file so we can do the same here:
server: {
port: process.env.PORT || 3000,
host: process.env.HOST || '0.0.0.0'
}
But first I want to make it work :)
FYI, I resolved the error by bringing back the
// nuxt.config.js
export default {
modules: [
- '@vue-storefront/middleware/nuxt'
],
+ publicRuntimeConfig: {
+ middlewareUrl: 'http://localhost:3000/api/'
+ }
} Out of context it looked like an upgrade instruction attached to the PR with that change. |
39903b7
to
515ce7e
Compare
This PR is the first step of incrementally upgrading Vue Storefront to the latest version (2.7.3 at the time).
Description
According to the 2.5.7 Changelog this is the first version that introduces some breaking changes since the current 2.5.0.
The middlewareUrl is applied now and it is being generated from the BASE_URL environment variable and it defaults to
localhost:3000
if not specified. This property is required since 2.5.7.Parts of the app had to be refactored. The
cacheControl
theme helper is not available anymore.Related Issue
Motivation and Context
How Has This Been Tested?
Tested by performing a checkout pass.
Screenshots (if appropriate):
Types of changes
Checklist: