Giter Club home page Giter Club logo

Comments (6)

wvovaw avatar wvovaw commented on June 22, 2024 1

Same for me. It worked well with JS but it works wrong after I switched my app to typescript.
Here is details:

nuxt 3 with Typescript uses nuxt.config.ts file for configuration. But the action ignores it and creates a fallback one which leads to wrong output:

yarn run v1.22.19
$ nuxt generate
[log] Nuxi 3.5.0
[log] Nuxt 3.5.0 with Nitro 2.4.1
[warn] Using experimental payload extraction for full-static output. You can opt-out by setting `experimental.payloadExtraction` to `false`.
[info] Building client...
[info] vite v4.3.8 building for production...
[info] transforming...
[info] ✓ 119 modules transformed.
[info] rendering chunks...
[info] computing gzip size...
[info] .nuxt/dist/client/manifest.json                                  2.[7](https://github.com/wvovaw/wvovaw.github.io/actions/runs/5044766976/jobs/9048208083#step:8:8)9 kB │ gzip:  0.51 kB
[info] .nuxt/dist/client/_nuxt/error-500.aa16ed4d.css                   1.95 kB │ gzip:  0.74 kB
[info] .nuxt/dist/client/_nuxt/error-404.23f2309d.css                   3.63 kB │ gzip:  1.12 kB
[info] .nuxt/dist/client/_nuxt/_plugin-vue_export-helper.c27b6911.js    0.09 kB │ gzip:  0.10 kB
[info] .nuxt/dist/client/_nuxt/index.[8](https://github.com/wvovaw/wvovaw.github.io/actions/runs/5044766976/jobs/9048208083#step:8:9)3569895.js                        0.39 kB │ gzip:  0.29 kB
[info] .nuxt/dist/client/_nuxt/error-component.84e5e8b1.js              1.18 kB │ gzip:  0.64 kB
[info] .nuxt/dist/client/_nuxt/default.3a0d8000.js                      1.72 kB │ gzip:  0.98 kB
[info] .nuxt/dist/client/_nuxt/error-500.2b2ba75b.js                    1.93 kB │ gzip:  1.02 kB
[info] .nuxt/dist/client/_nuxt/error-404.5d70a75f.js                    2.31 kB │ gzip:  1.19 kB
[info] .nuxt/dist/client/_nuxt/nuxt-link.44b36c52.js                    4.32 kB │ gzip:  1.83 kB
[info] .nuxt/dist/client/_nuxt/entry.cad7fd5b.js                      139.32 kB │ gzip: 52.72 kB
[info] ✓ built in 2.46s
[success] Client built in 2467ms
[info] Building server...
[info] vite v4.3.8 building SSR bundle for production...
[info] transforming...
[info] ✓ 74 modules transformed.
[info] rendering chunks...
[info] .nuxt/dist/server/_nuxt/error-404-styles.a5c3f351.mjs           0.08 kB
[info] .nuxt/dist/server/_nuxt/error-500-styles.6b5b5ff2.mjs           0.08 kB
[info] .nuxt/dist/server/styles.mjs                                    0.35 kB
[info] .nuxt/dist/server/_nuxt/index-e12b288f.js                       0.22 kB │ map:  5.28 kB
[info] .nuxt/dist/server/_nuxt/_plugin-vue_export-helper-cc2b3d55.js   0.25 kB │ map:  0.13 kB
[info] .nuxt/dist/server/_nuxt/island-renderer-77ac9752.js             1.12 kB │ map:  1.42 kB
[info] .nuxt/dist/server/_nuxt/index-5c78600a.js                       1.24 kB │ map:  0.44 kB
[info] .nuxt/dist/server/_nuxt/error-component-fc2e7220.js             2.04 kB │ map:  2.71 kB
[info] .nuxt/dist/server/_nuxt/error-500-styles-1.mjs-0a86f27a.js      2.17 kB │ map:  0.12 kB
[info] .nuxt/dist/server/_nuxt/error-dev-styles-1.mjs-90bc7cbc.js      2.46 kB │ map:  0.12 kB
[info] .nuxt/dist/server/_nuxt/error-500-7bf32de6.js                   3.18 kB │ map:  3.79 kB
[info] .nuxt/dist/server/_nuxt/error-404-styles-1.mjs-6ef6e240.js      3.86 kB │ map:  0.12 kB
[info] .nuxt/dist/server/_nuxt/error-404-ddc98d1a.js                   4.07 kB │ map:  5.83 kB
[info] .nuxt/dist/server/_nuxt/default-5f629116.js                     4.67 kB │ map:  2.42 kB
[info] .nuxt/dist/server/_nuxt/nuxt-link-0d39ff03.js                   5.97 kB │ map: 13.18 kB
[info] .nuxt/dist/server/server.mjs                                   31.86 kB │ map: 74.74 kB
[info] ✓ built in 889ms
[success] Server built in 899ms
[success] [nitro] Generated public .output/public
[info] [nitro] Initializing prerenderer
[info] [nitro] Prerendering 3 initial routes with crawler
[log] [nitro]   ├─ / (48ms) (Error: [500] )
[log] [nitro]   ├─ /200.html (1ms)
[log] [nitro]   ├─ /404.html (1ms)
[success] You can now deploy `.output/public` to any static hosting!
Done in 6.6[9](https://github.com/wvovaw/wvovaw.github.io/actions/runs/5044766976/jobs/9048208083#step:8:10)s.

This output has no my code at all because of the fallback nuxt config created by the action.

I renamed the nuxt.config.ts to nuxt.config.js and the action worked as expected.

from configure-pages.

wvovaw avatar wvovaw commented on June 22, 2024

Here nuxt config path is hardcoded to nuxt.config.js

from configure-pages.

yoannchaudet avatar yoannchaudet commented on June 22, 2024

This Action makes a best effort approach to update your configuration file. It only understands JavaScript and not TypeScript which is why we don't look at .ts files. While it may work for you, the minute you add TypeScript specific code in this file that our JavaScript parser does not recognize, it will blow up.

from configure-pages.

Ni55aN avatar Ni55aN commented on June 22, 2024

@yoannchaudet I don't have any objections to exclusively supporting JS configs. The only issue is that it covertly generates JS configuration without providing any hints or warnings about it

from configure-pages.

yoannchaudet avatar yoannchaudet commented on June 22, 2024

Got it. Contributions are open on this repo. Don't hesitate to propose a PR. Keeping this issue open for now.

from configure-pages.

timsu92 avatar timsu92 commented on June 22, 2024

Can you guys take a look whether I've fixed it or not?

from configure-pages.

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.