Closed Dav1dde closed 5 years ago
You can send pull request
I will look into it when I get home.
@Dav1dde I will investigate today
I went ahead and opened a PR, input highly appreciated.
@Dav1dde
Could you install the latest version yarn add @ngxs/storage-plugin@dev
and check if it's working correctly? So we're able to add it to the 3.5.0
milestone
Works perfectly!
{
"@ngxs/storage-plugin": "^3.4.3-dev.master-3528deb",
"@ngxs/store": "^3.4.3-dev.master-3528deb",
}
Released in 3.5.0
I'm submitting a...
Current behavior
SSR fails with
I have seen #465 but this is either a regression or was never really fixed. I am using the
STORAGE_ENGINE
workaround but this does not solve the issue, localStorage is still undefined and throws an exception.Relevant code from
server.js
:Identical to: https://github.com/ngxs/store/blob/master/packages/storage-plugin/src/storage.module.ts#L23
Expected behavior
SSR does not fail and storage is either ignored or stubbed.
Minimal reproduction of the problem with instructions
Angular Universal example, add NGXS and NGXS Storage modules.
Environment