Drab webpack problem - Uncaught ReferenceError: require is not defined

@dokuzbir thanks for the answer!
I don’t have webpack yet but I missed Endpoint part in config:

config :drab,MyAppWeb.Endpoint, js_socket_constructor: "Phoenix.Socket"
and
<script src="<%= static_path(@conn, "/js/phoenix.js") %>"></script> in layout.

This way it worked!