Emily
I have VueJS GUIs with the project generated using Webpack.
I have Elixir modules that will need to be used by the VueJS GUIs.
I foresee I will eventually have an umbrella Phoenix project. Right now it is just VuejS, Javascript, and Elixir modules.
I need to merge the files from VueJS, Elixir, & Phoenix into 1 project.
I need it to eventually be a compiled standalone app.
I have no clue where to go next doing this according to conventions.
Anyone have a guide or tutorial for the next steps?
Trending in Questions
I’m working on a project that simulates the bumbl example in the programming phoenix book. It acts almost like an email client. We have a...
New
Hello,
I know there is an approach for handling lists that allows for optimized traversal, but I can’t recall the specific method (somet...
New
Documentation
While reading the Scoped Routes section, I noticed that the documentation currently refers to a problem without explainin...
New
I’m seeing that a list inside a Kino.DataTable will be interpreted as a charlist, even if the Kino.configure() is set to charlists: :as_l...
New
So my question is quite simple and i have found no conclusive answer on forum, google or AI.
Should we use :erlang.float for Integer to ...
New
Hi, I’ve just set up an application with ash_authentication. There is only magic link strategy for now, so there is no confirmation add o...
New
I recently noticed that Elixir’s Logger defaults its primary log level to :debug when no :logger, :level application configuration is pre...
New
Other Trending Topics
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
I am happy to introduce the very α version of the new programming language compiled to BEAM.
Welcome Cure.
It has literally three kille...
New
Hi there! We created Gust: A task orchestrator inspired by Airflow.
For those who have never heard about Aiflow, it’s a Python-based wor...
New
Hi everyone!
The first release candidate for the Expert language server project is now available!
We’ve published a press release detai...
New
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixirconf-us
- #ai
- #blog-post
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #metaprogramming
- #hex
- #security










Showing Posts 1 to 10- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
Hoegbo
I read through this litterally 5 minutes ago.
https://gist.github.com/jlauemoeller/d53ddd028387cd139c31bf2282dd12f4
I will be starting this tomorrow morning myself.
peerreynders
FYI:
https://content.nanobox.io/phoenix-vue-js-running-in-minutes/
Though it also involves nanobox, so it’s likely of limited use …
idi527
There are some github projects which use phoenix + vue
[-] GitHub - akeating/pespa: A demonstration of single page applications (Vuejs / Elm) with api server (Elixir/Phoenixframework) using graphql subscriptions. · GitHub
[-] GitHub - ssuprunenko/phoenix-vue-2-example: Elixir Phoenix, Brunch, Vue.js 2.0 · GitHub
[-] GitHub - jespr/vue-phoenix-chat: Chat built with Vue.js 2.0 and the Phoenix Framework (Elixir) · GitHub
[-] GitHub - loongmxbt/pxvue: Phoenix + Vue + Webpack · GitHub
WolfDan
The best example I know:
It’s a pretty good example, its a SPA example but think can help a lot
peerreynders
Well, it kind of works, there were a few minor omissions here and there - nothing that couldn’t be sussed out fairly quickly. But there was something that bothered me:
Say what? Brunch is a bundler and the default Phoenix project bundles to
priv/static/css/app.css(/css/app.cssto the outside world). Why do I need another CSS file? It turns out that Brunch’s plugin ordering seems to be determined to the some degree by the order they are found in thepackage.jsondependencies (which is automatically kept in alphabetical order). Socss-brunchruns beforejavascript-brunchfollowed byvue-brunch, So that CSS file generated byvue-brunchcomes into existence too late to be bundled with the other CSS files - so the workaround is to have the Vue CSS in a separate file. Now there is a discussion around possibly being able to order Brunch plugins in the future - but I’m starting to wonder if Brunch is showing its age (i.e. being geared towards a different kind of web development workflow).Furthermore I can’t help but get the impression that Vue tooling tends to favour Webpack. So it may be worth considering getting on the Webpack bus sooner than later. Now Using Webpack with Phoenix and Elixir only deals with webpack 1.13 - but it still gives a good guide to the “integration points” that need to be taken care of. There are two possible surprises:
--no-brunchoption. It’s simply easier to delete thebrunch-config.jsand modify thepackage.jsonto strip out “project-level brunch”, but all this has to happen before the dependencies are loaded so,There is also a Brunch dependency in
config/dev.exsthat needs to be adapted. Once the configuration files have been adapted it’s easy enough just to load them later withmix deps.get- at this point in time Brunch is still used on the dependency level to generatephoenix_html.jsandphoenix.js. Interestingly live-reloading doesn’t actually rely on Brunch (article: Behind the magic of Phoenix LiveReload).So it might make sense to become familiar with Webpack 2 on a Phoenix base install and once all of that seems to work, push further by adding Vue into the mix.
bubbiZanetti
https://github.com/odiumediae/webpacker ← Although its for react it shows how to integrate phoenix 1.3 with webpack 2.
OvermindDL1
You could just toss brunch and use npm as a build system, after all it is, and you already have it.
peerreynders
I know - I was kind of heading there:
.
.
But there don’t seem to the caliber of “one-thing-only” tools that cover the other build aspects the way
rollup.jshas got the JavaScript build covered. PostCSS is promising but for example this gets gulp involved to do bundling - not going down that rabbit hole.Also I think it may be too great a cost to give up on the integration support that Vue seems to have with webpack (even though there seem to be enough people who cringe when they hear “webpack”).
adamk
Hi Emily, I lean towards keeping it simple. My suggestion would be to keep your vuejs client directory out of the phoenix build system. You gain the integrated development and build environment that’s so well supported by vuejs. Create apis in phoenix that your vuejs application can call and update your view using vue. When you’re ready to deploy to production, generate the production build and serve it statically with a proxy of your api calls to your elixir/phoenix api endpoints. The vue production build is in the
distdirectory but you can configure it to place it anywhere, even directly into your phoenix directory structure if you prefer.cpgo
Its this line right? https://github.com/phoenixframework/phoenix/blob/master/installer/templates/new/config/dev.exs#L27
Do you know if there is a reason this is not something like
since there is already a
watchscript onpackage.json.This would make even easier to switch front end tooling.