It seems to kinda work if import {Socket} from "phoenix"
is uncommented from app.js in the phoenix project. I don’t know enough about webpack yet to say why, but this defines the Phoenix
module within the context of the browser console (not just Socket).