window.Larave because it is initially undefined and window.Laravel.jsPermissions will throw an error if you don't use the approach described above.
Second JSON.parse ensures data, that is in the object is covered in quotes like "rules" and "permissions", to have correct object keys, so they can be accessed correctly in packages index.js file.
To set the permission and rules in the correct manner you should implement them in this way:
window.Laravel = { jsPermissions: JSON.parse(permissionsData.value) };
window.Larave because it is initially undefined and window.Laravel.jsPermissions will throw an error if you don't use the approach described above.
Second JSON.parse ensures data, that is in the object is covered in quotes like "rules" and "permissions", to have correct object keys, so they can be accessed correctly in packages index.js file.