Vertigo
Phoenix 1.4 issue while working through FWD with Elixir, OTP and Phoenix
Arriving at chapter 7 we enter the world of websockets to test out a game channel. The author seems to be working with Phoenix 1.3.X with its build tool set to brunch. At the time of this writing Phoenix 1.4.X ships with webpack instead. At page 160 ‘Establish a Client Connection’ the author displays a snippet from within a browser’s console;
> var phoenix = require("phoenix")
undefined
This doesn’t work as variables ‘phoenix’, nor ‘require’ seem to be globally exposed by webpack. What’s the proper webpack configuration or console snippet update to continue the tutorial as-is? If someone already worked through this book with Phoenix 1.4+ it would be nice to have a reference somewhere on this forum. Meanwhile I’ll try my luck poking around the webpack config. Stay tuned.
Marked As Solved
kokolegorille
I show a little hack… for the same book, same problem.
Popular in Questions
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance









