Hello,
I used the cookiecutter to create the component and it works fine if I put the component directory (customcomp) in the same directory as my script:
from customcomp import CustomComp
app = dash.Dash(__name__)
app.layout = html.Div([
CustomComp(id="comp")
])
Using the code above, dash finds the javascript files and serves them, and all is well.
But if I move the customcomp directory to /usr/local/lib/python3.7/dist-packages/mymodule/customcomp and do a:
from mymodule.customcomp import CustomComp
app = dash.Dash(__name__)
app.layout = html.Div([
CustomComp(id="comp")
])
something happens with the registration of the component and Dash doesn’t serve the javascript even though it can find the python code associated with CustomComp. I had assumed that everything was referenced from the location of the python code (customcomp.py) but I’m missing something.
Any hints on how to get this to work?
thanks