3

Created some snippets via StackBlitz editor and saved the code, but after sharing url (or copy url) the stackblitz opened it in default condition(so my custom code gone).

Why stackblitz not sharing my code ?

a_main
  • 377
  • 1
  • 6
  • 13

1 Answers1

1

I know it's been over 4 years now, and many things changed.

but I will answer this question if you do not yet know about it.

You might set your snippets in the Workspace snippets so it will only be allowed in that project, you need to set up in the User Snippets instead so it turns globally (only work on the authenticated account) - Will work if you copy the link or refresh the page.

But if you want to share the link, you will need to create the snippets on Workspace Snippets instead.

#Edit 1:

  • The Workspace Snippets work in the project scope itself only, but can be used to be shared.
  • The User Snippets work in all the user's projects, but not for sharing.
  • If you want to share snippets, implement them in Workspace Snippets.
  • If you want to keep the snippets synced for all of your projects, implement them in User Snippets.

Image 1: User Snippets with logged-in account

Image 2: Workspace Snippets on Incognito Tab