elixir - Import Phoenix Socket, Phoenix HTML JS Modules via Brunch when web server application is in an umbrella app -


when phoenix web server not in umbrella app, brunch finds modules in "deps/phoenix/web/static/js/socket" , "deps/phoenix_html/web/static/js/phoenix_html" because phoenix dependency gets installed location relative brunch config file.

when in umbrella app, dependencies installed in umbrella app itself, not web server app. @ "../../deps/phoenix/web/static/js/" instead.

i tried adding "../.." locations in brunch config file , import statements, , cannot brunch find files.

you need configure brunch config point proper directory:

watched: ["../../deps/phoenix/web/static",           "../../deps/phoenix_html/web/static",           "web/static", "test/static"], 

and import:

import "../../../deps/phoenix_html/web/static/js/phoenix_html" 

we should fix phoenix though generate such default inside umbrellas.


Comments

Popular posts from this blog

c# - Binding a comma separated list to a List<int> in asp.net web api -

Delphi 7 and decode UTF-8 base64 -

html - Is there any way to exclude a single element from the style? (Bootstrap) -