Closed dohomi closed 5 years ago
It's on my roadmap, I need to dig a bit more on Now v2 ;)
That would be great! Now v2 is giving be big headaches at the moment. None of my Nuxt projects were able to convert from v1 => v2 yet
I've tested a bit, it will be hard :smile:
First attempt was to use @now/node
builder: the tool ncc
used to package source code and make it ready to lambda function seems not working with esm
package used in UVue.
Second attempt with @now/node-server
: it seems better but lambda size limit is 50mb and my package have 52mb of files...
Finally got it working!
What I've done:
yarn
to npm
(yarn seems buggy with now)devDependencies
to peerDependencies
to have a faster builddevDependencies
from node_modules
Now my package is 22mb of files, and :tada:
https://uvue-examples-1o0lbwihq.now.sh/
Full commit here: https://github.com/universal-vue/examples/commit/f8deae00767ac77b7b703f078d2ab377a0f2fcef
cool beans @chymz 👍
the ncc
project of zeit seems really cool for creating lambda bundles, haven't checked it yet.
@chymz cool thanks for doing that. I haven't got much time to try this package yet, but what I am doing with NuxtJS is following:
/.nuxt/dist/client
statically under a different subdomain as static files (as CDN)build.publicPath
inside nuxt.config.js to point to public files CDN domain of 1.)That gave me very nice results for Pagespeed and Lighthouse Not sure if thats possible with this package but I'm sure you can archive the same with the different bundler section for the public client side files after building the project. Cheers and keep up the great work
Hi @chymz I'm currently playing around with the new version of now which basically wraps application code through builder to run serverless functions. Is it possible to run a server of the pre-builded sources similar like the functional approach starting NuxtJS programatically? I found this very basic example: https://github.com/zeit/now-examples/tree/master/vue-ssr It would be great to add an example of using uvue on the now infrastructure Cheers