Offline Choropleth world map plot

I am trying to generate a world map with data in plotly as an html file, which should offline usable.

The problem is that plotly wants to use https://cdn.plot.ly/world_110m.json, is there a way to give it to plotly locally. Like building it into the html file. (Internet while compiling is O.K. afterwards it should be able to run without)

To demonstrate my Problem, I have copied the example from here Choropleth maps in Python and it looks like this:

import plotly.graph_objects as go
import pandas as pd

df = pd.read_csv('https://raw.githubusercontent.com/plotly/datasets/master/2014_world_gdp_with_codes.csv')

fig = go.Figure(data=go.Choropleth(
    locations = df['CODE'],
    z = df['GDP (BILLIONS)'],
    text = df['COUNTRY'],
    colorscale = 'Blues',
    autocolorscale=False,
    reversescale=True,
    marker_line_color='darkgray',
    marker_line_width=0.5,
    colorbar_tickprefix = '$',
    colorbar_title = 'GDP<br>Billions US$',
))

fig.update_layout(
    title_text='2014 Global GDP',
    geo=dict(
        showframe=False,
        showcoastlines=False,
        projection_type='equirectangular',
    ),
    annotations = [dict(
        x=0.55,
        y=0.1,
        xref='paper',
        yref='paper',
        text='Source: <a href="https://www.cia.gov/library/publications/the-world-factbook/fields/2195.html">\
            CIA World Factbook</a>',
        showarrow = False
    )]
)
fig.write_html("file.html")

When I try to open it without internet it looks like this(write it to html)

But adding fig.write_html("file.html",config={'topojsonURL':'./world_110m.json'})
(the files are in the same dir, and replacing it with the files URL https://cdn.plot.ly/world_110m.json also stops it from displaying while in internet)

Doesnโ€™t help either (is also stops working with internet)

If you try it out, donโ€™t forget to use a private window to simulate a different browser

I am running into the same issue. Has anyone found a solution to this?

This seems peculiarly difficult. If you do the following, it looks like a step in the right direction, in that it tries to read the geojson file locally, but then hits a Cross-Origin Request Blocked error (visible in browser tools) that I donโ€™t know how to bypass:

fig.write_html("worldmap.html", config={"topojsonURL":"assets/"})

Iโ€™m drawing on this post, which gives an alternative of editing plotly.min.js and also gives an alternative solution if using Dash