Sharing svelte store across two customElements
- shared svelte store
- components use it for dev
- compiled the build step skips adding it to the module
rollup -c rollup.config.store.js
- open localhost:3000
- click on "the count is 0"
- watch both change
- Open developer tools
- type
superstore.count.subscribe(value => a = value)
- type and observe number matches count
- click on "the count is X"
- type and observe number matches count
docker run --name svelte-shared-store \
-p 8080:80 \
-v $PWD/build:/usr/share/nginx/html:ro \
-v $PWD/nginx.conf:/etc/nginx/nginx.conf:ro \
-P -d nginx:1.17-alpine
docker container rm --force svelte-shared-store