Slate is a toolkit for developing Shopify themes. It's designed to assist your workflow and speed up the process of developing, testing, and deploying themes.
The asset server always binds to the lowest numbered interface, even if it is not the default interface (i.e., the top interface in OS X Network preference pane). The ssl-check script, however, will create certs for the default interface. This will cause styles and js to be broken during local development.
Replication steps
plugin to a second ethernet interface (e.g. dock your laptop to a dock with wired ethernet)
run yarn start.
no styles / js
More Information
I poked around with node-ip to see if there was a way to properly detect the ethernet interface set to default rather than the lowest one, but I did not find one (although you can ask for the address of a particular interface)
Instead I was able to workaround by changing the ssl-check script to add the ip addresses from all interfaces from en0 to en10 (this might be a security issue if one of those interfaces has external access):
interfaces=($(seq 0 1 10))
domains=(
"localhost"
)
for interface in ${interfaces[@]}; do
local_ip=$(ipconfig getifaddr en$interface)
domains+=( $local_ip )
done
Problem
The asset server always binds to the lowest numbered interface, even if it is not the default interface (i.e., the top interface in OS X Network preference pane). The ssl-check script, however, will create certs for the default interface. This will cause styles and js to be broken during local development.
Replication steps
More Information
I poked around with
node-ip
to see if there was a way to properly detect the ethernet interface set to default rather than the lowest one, but I did not find one (although you can ask for the address of a particular interface)Instead I was able to workaround by changing the
ssl-check
script to add the ip addresses from all interfaces from en0 to en10 (this might be a security issue if one of those interfaces has external access):