Giter Club home page Giter Club logo

Comments (4)

ionos-deploy-now-support avatar ionos-deploy-now-support commented on June 13, 2024

Hello, thanks for reaching us and for your request ... We had to solve an issue with our deploy-to-ionos-action. With the new release of our Action, NuxtJS works out of the box with Deploy Now using dist as deployment directory.
Also, I would like to point out that only static site generation works with NuxtJS with Node.js is not available yet.

Thank you for pointing out this issue.

from ionos-deploy-now.

kjanusz avatar kjanusz commented on June 13, 2024

Hello, thanks!

I have a question about this: I currently have some projects with Nuxt 3 SSR on IONOS. That's why I modified the previous script (see ionos-deploy-now/hello-nuxt#5).

Does that mean I can go back now to dist?

 #dist-folder: .output/public
 dist-folder: dist

Do I have to do anything else?

What about the adjustment?

<IfModule mod_mime.c>
  AddType text/javascript js mjs
</IfModule>

Could you please publish an hello-nuxt-3 example below as for Nuxt 2? I think that would be very helpful.


Small addition:

Nuxt 3 supports static hosting as follows (if I understood the documentation correctly):

  1. SPA nuxt build + (ssr: false in nuxt.config)
  2. SSG nuxt generate + (ssr: true <- default in nuxt.config)

Are both variants supported by the new release of deploy-to-ionos-action? Do you recognize that automatically?

from ionos-deploy-now.

ionos-deploy-now-support avatar ionos-deploy-now-support commented on June 13, 2024

Does that mean I can go back now to dist?

Yes, you will be able to use dist as publish folder again, we are now supporting symlinks as well.

Are both variants supported by the new release of deploy-to-ionos-action? Do you recognize that automatically?

We support both builds, as long as they can be hosted statically. But the detection currently does not recognize the configured build mode.

Do I have to do anything else?

You will also need an .htaccess file to support the .mjs extension.

First create a .htaccess.template file inside your .deploy-now directory like described here.

<IfModule mod_mime.c>
    # add support for ECMAScript modules
    AddType text/javascript mjs js
</IfModule>

Paste the workflow step below in your .github/workflows/deploy-now.yaml before the Deploy to IONOS step.
It will generate the .htaccess file in your publish directory.

- name: Render templates
  if: ${{ steps.project.outputs.deployment-enabled == 'true' }}
  uses: ionos-deploy-now/template-renderer-action@v1
  id: template
  with:
    output-directory: .output/public
    secrets: |

Now the .htaccess file should be deployed into your dist folder.

We created a Nuxt 3 sample for you and are extending the detection to incorporate the manual adjustments above.

We hope this helps and thank you for pointing out this issue

from ionos-deploy-now.

Robert95Sch avatar Robert95Sch commented on June 13, 2024

Hi, we've just released mime type support on our infrastructure. The above mentioned adaptions of the .htaccess and the render templates step in GitHub Actions is not necessary anymore.
Happy deploying!

from ionos-deploy-now.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.