I have modified my existing meteor app to use dynamic imports of blaze templates (.html, css, js) as a means of improving client startup times.
When running it in development mode, it is working fine, but if i access the dev-mode app through a local network, it does not load the dynamic modules. Is this expected?
I find it odd, as the dev-mode app is loading data through pub/sub in this same scenario.
my dev-mode app is running on 192.168.1.214:3000, and is visible and runs from 192.168.1.218 by visiting 192.168.1.214:3000.
and though pub/sub is working from 192.168.1.218, dynamic imports are not.
You should watch for the network section in your browser console (on a machine connected to your local network) to see what the import is trying to fetch. If ROOT_URL is not set, it may try to reach it on localhost instead of 192.168.1.214
because pub sub is going through a socket and is initiated by the server, not the client; import is an http request so it’s requested client side.
just set the ROOT_URL to your ip address, it should work as expected.
Thanks for clarifying. I see a parallel between pub/sub (which I use a lot) and dynamic-import. Hopefully in the long run they will support hot module upgrading as well, which would make the parallel even more obvious.