modern.js
modern.js copied to clipboard
[Feature]: Add guides about Modern.js App deployment
What problem does this feature solve?
Add guides on how to deploy Modern.js app on these platforms:
- Vercel
- Netlify
- Alibaba cloud
- More...
What does the proposed API look like?
Ref: https://nuxtjs.org/deployments
Okey, I will finish these docs in Jun.
And Azure static website please
Any update on this?
^
No progress yet.
You can refer to "output files" to understand the dist directory structure of Modern.js and how to custom the output structure. This will help you to deploy the application to different platforms.
ModernJS is amazing in terms of Developer productivity. the missing piece is how to deploy this after all the development. i normally deploy my apps in docker containers i would like to see more on this in the docs. currently there is no option for deploying in a Docker image or whatsoever. For this framework to be complete we need a way to deploy the application in different environments.
FYI: @chenjiahan your link for output fills is not going to the right page
i found a way to deploy to azure cloud. i will write the solution and share it. let me know if i can be of help on this issue.
any progress?
@mitch1009 Were you able to deploy your build without needing the Node.js runtime?
Watching this one too.
@zackarychapple I'm not sure what your setup is, but I wrote some basic notes on hosting a static SPA on S3 here:
- https://github.com/web-infra-dev/modern.js/discussions/5501#discussioncomment-9070123
@zackarychapple I'm not sure what your setup is, but I wrote some basic notes on hosting a static SPA on S3 here:
awesome thanks for sharing.
We have provided deployment solutions based on Vercel, Netlify, and general Node.js some time ago. For details, please check Deploy Application.
if you have other platforms that need support, you can continue to issue
We have provided deployment solutions based on Vercel, Netlify, and general Node.js some time ago. For details, please check Deploy Application.
if you have other platforms that need support, you can continue to issue
The docs still don't outline how to deploy the app as static SPA. I think that would be helpful for many people, as Modern.js is great at building for such a use case.
The docs still don't outline how to deploy the app as static SPA
Okey, let us add it..And could you give a deploy example for「static SPA」..How do you want to deploy it?
The docs still don't outline how to deploy the app as static SPA. I think that would be helpful for many people, as Modern.js is great at building for such a use case.
I think what you may need is this , which is called "Pure Front-end Project" to distinguish it from "Full Stack Project", which may lead to misunderstanding.
@zllkjc I wrote up these notes on how we were able to configure Modern.js to produce a "static SPA". Pretty much, we wanted to be able to copy the build output and then serve it using a web server such as Nginx, or in our case S3+Cloudfront. We didn't want to use a service like Netlify or have to run Node.js to serve it. Following this kind of setup has worked well so far for us, with both SPAs and microfrontends, and with/out Modern.js routing.
- https://github.com/web-infra-dev/modern.js/discussions/5501#discussioncomment-9070123
Hi there!
We are also migrating from nextjs to modernjs (the spa experience here is awesome!) and think it would be really helpful to document how to deploy it as a static-spa. Maybe examples/guides related to aws/cloudfront, cloudflare pages, etc.
If it is not already there, I can try to contribute to the docs but after deploying it to production in my current organization. We hope to have modernjs in prod in dec 2024.
Thanks! Feel free to submit PRs to improve the deploy guide 😄
Cool! Now there is no guide for static-spa, thanks for contribute~
And adding a piece of information that may help you. When you build the pure front-end product of Modern.js for Netlify, a _redirects
file will be generated for route mapping, and other platforms deploying static-spa may need the same relationship.
Thanks for the extra info!
After getting more experience of it deployed to amplify or s3 + cloudfront I'll comeback and try to contribute!