{"html_url": "https://github.com/simonw/datasette/issues/291#issuecomment-392302456", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/291", "id": 392302456, "node_id": "MDEyOklzc3VlQ29tbWVudDM5MjMwMjQ1Ng==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2018-05-27T03:19:24Z", "updated_at": "2018-05-27T03:19:24Z", "author_association": "OWNER", "body": "The big gap in this solution is conflicting versions: I don't yet have a story for what happens if two plugins attempt to load different versions of Leaflet. ", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 326783670, "label": "Avoid plugins accidentally loading dependencies twice"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/291#issuecomment-392302416", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/291", "id": 392302416, "node_id": "MDEyOklzc3VlQ29tbWVudDM5MjMwMjQxNg==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2018-05-27T03:18:16Z", "updated_at": "2018-05-27T03:18:16Z", "author_association": "OWNER", "body": "For the moment then I'm going with a really simple solution: when iterating through `extra_css_urls` and `extra_js_urls` de-dupe by URL and avoid outputting the same link twice.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 326783670, "label": "Avoid plugins accidentally loading dependencies twice"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/291#issuecomment-392302406", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/291", "id": 392302406, "node_id": "MDEyOklzc3VlQ29tbWVudDM5MjMwMjQwNg==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2018-05-27T03:18:06Z", "updated_at": "2018-05-27T03:18:06Z", "author_association": "OWNER", "body": "My first attempt at this was to have plugins depend on each other - so there would be a `datasette-leaflet` plugin which adds Leaflet to the page, and the `datasette-cluster-map` and `datasette-leaflet-geojson` plugins would depend on that plugin.\r\n\r\nI tried this and it didn't work, because it turns out the order in which plugins are loaded isn't predictable. `datasette-cluster-map` ended up adding it's script link before Leaflet had been loaded by `datasette-leaflet`, resulting in JavaScript errors.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 326783670, "label": "Avoid plugins accidentally loading dependencies twice"}, "performed_via_github_app": null}