DEV Community

Phoenix 1.6 + Vue (esbuild)

Caleb Weeks on January 18, 2022

Phoenix 1.6 dropped support for webpack in favor of esbuild. Since this is a relatively recent update, most tutorials about using a React or Vue wi...
Collapse
 
josempena profile image
JoseMPena

All good but the following error pops up:
ReferenceError: vuePlugin is not defined

And indeed, I cannot see where the vuePlugin function comes from.

Collapse
 
sethcalebweeks profile image
Caleb Weeks

Good catch. Add const vuePlugin = require("esbuild-vue"); to the top of the assets/build.js file.

Collapse
 
josempena profile image
JoseMPena

Hi. Any idea how to add Tailwind css to the pipeline?
I've been trying for the last 4 hours with no success.

Thanks.

Thread Thread
 
sethcalebweeks profile image
Caleb Weeks

I found these two articles which may help. I'm not planning on using Tailwind for this project at the moment, but if I end up figuring it out, I'll let you know!

Thread Thread
 
josempena profile image
JoseMPena

Hi, thanks for replying. I finally got it working using a custom pipeline based on the very articles you shared. If you ever need to take a look, just drop a message.
Thanks.

Thread Thread
 
sethcalebweeks profile image
Caleb Weeks

Awesome! Glad it worked out!

Collapse
 
egagodzy profile image
egagodzy

dev-to-uploads.s3.amazonaws.com/up...
This does not work. I guarantee committing according to the guide, getting an error. I downloaded your stack from github and it also gives an error.

Collapse
 
sethcalebweeks profile image
Caleb Weeks

Try running npm install in your assets directory.

Collapse
 
egagodzy profile image
egagodzy

may be, it's only for version 1.6? not for 1.6.6?

Collapse
 
egagodzy profile image
egagodzy

im trying, same error