Closed wannevancamp closed 9 months ago
I would recommend to use window.localStorage thats kinda what the storage helper is doing
We needed the functionality of the cookie-storage.helper.js which uses document.cookie
instead of window.localStorage
. Anyway, we have copied the cookie-storage.helper.js to our plugin to make es_build work.
At first, I thought that the cookie-storage.helper.js helper class was included in this package, that's why I was confused. Probably this can be a useful addition when working with cookies.
Question
I'm trying to use the
shopware-storefront-sdk
for the first time. After runningbin/build-storefront.sh
the following error is thrown:Is there some configuration missing in the README.md or am I doing something wrong? This is how my extension is set up. The main goal is to use the CookieStorageHelper in both 6.5 and 6.6 so that only one version needs to be maintained.
Resources/app/storefront/build/webpack.config.js
Resources/app/storefront/package.json
Resources/app/storefront/tsconfig.json
Plugin class:
export default class MyPlugin extends window.PluginBaseClass {
init() { if(CookieStorageHelper.getItem('cookie-name')){} }