module MyAppModule
@app MyApp begin
end
ui() = "Hello World"
@page("/", ui, app = MyApp)
end
up()
# at this point the app loads correctly
import .MyAppModule.MyApp
# at this point the app doesn't load anymore
The reason is that after importing the mount point's name is no longer prefixed by the module name, so the following error is displayed in the browser's console
Failed to mount app: mount target selector "#Main_MyAppModule_MyApp" returned null.
Instead, the name MyApp references the correct div.
The reason is that after importing the mount point's name is no longer prefixed by the module name, so the following error is displayed in the browser's console
Instead, the name
MyApp
references the correct div.