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
What is the motivation for adding / enhancing this feature?
Currently, we are using multiple ways of checking if the code is running in SSR including:
isServer in @vue-storefront/core/helpers
typeof window === 'undefined'
Vue.prototype.$isServer
Passing though parameters i.e. in server registration
and possibly others.
I suggest to use isServer from @vue-storefront/core/helpers as the only way to check the environment type as it is the easiest way to mock in tests and allows us to add some enhancements in the future if needed.
What are the acceptance criteria
everywhere in the code we are using isServer in @vue-storefront/core/helpers as the way to check if the runtime environment is server or not
isServer in module registration hooks is deprecated and shall throw logger.warn when reading its value. Should be removed in a couple of versions as redundant.
Can you complete this feature request by yourself?
Yes
The text was updated successfully, but these errors were encountered:
I need to change some other minor things and it will be ready the next week
lukeromanowicz
added
feature request
Requests for new features. Please be as specific as possible and provide proposal API if it you can
refactor
Code refactoring
and removed
feature request
Requests for new features. Please be as specific as possible and provide proposal API if it you can
labels
Feb 21, 2019
What is the motivation for adding / enhancing this feature?
Currently, we are using multiple ways of checking if the code is running in SSR including:
isServer
in@vue-storefront/core/helpers
typeof window === 'undefined'
Vue.prototype.$isServer
and possibly others.
I suggest to use
isServer
from@vue-storefront/core/helpers
as the only way to check the environment type as it is the easiest way to mock in tests and allows us to add some enhancements in the future if needed.What are the acceptance criteria
isServer
in@vue-storefront/core/helpers
as the way to check if the runtime environment isserver
or notCan you complete this feature request by yourself?
Yes
The text was updated successfully, but these errors were encountered: