Giter Club home page Giter Club logo

Comments (7)

yankeeinlondon avatar yankeeinlondon commented on May 30, 2024 1

Ok great. I'll give this a try and post this issue to presite. Also wanted to say thank you for all the amazing stuff you're contributing to open source. Loved this starter template and love all the TS stuff you're doing as well.

from vitesse.

yankeeinlondon avatar yankeeinlondon commented on May 30, 2024

If I run Presite from the command line, I get the following output:

Using config from presite.config.js
Copy static assets
Crawling contents from http://localhost:52860/
Message from http://localhost:52860/_assets/style.af3afb7c.css:undefined:undefined Failed to load resource: net::ERR_FAILED
Message from http://localhost:52860/_assets/index.8b2590b7.js:44:190465 Alumni app is mounted
Crawling contents from http://localhost:52860/profile
Writing /index.html for /
Message from http://localhost:52860/_assets/index.8b2590b7.js:44:190465 Alumni app is mounted
Writing /profile/index.html for /profile
Done, check out OUT folder

and looking at the two index files that are produced, i see the same link reference in the HTML:

<link rel="stylesheet" href="/_assets/style.af3afb7c.css">

and interestingly it only errors on the root route. Seems very odd.

from vitesse.

yankeeinlondon avatar yankeeinlondon commented on May 30, 2024

Indeed if I run a simple HTTP server on the output of Presite, I get no errors in the Chrome console:

image

and from the server logs I can see the style sheet being loaded:

image

from vitesse.

yankeeinlondon avatar yankeeinlondon commented on May 30, 2024

Should I be adding this to the Presite repo's issues?

from vitesse.

yankeeinlondon avatar yankeeinlondon commented on May 30, 2024

For now I've commited a "the blind leading the naked" commit which changes the build to:

{
  "build": "cross-env NODE_ENV=production vite build 2> /dev/null && esno scripts/ssg.ts 2> /dev/null"
}

Can't say I feel good about this but it does build successfully. It would appear that both the postcss warnings and the presite error write to STDERR and this then returns an error code to Node's process.

from vitesse.

yankeeinlondon avatar yankeeinlondon commented on May 30, 2024

That you didn't experience this must be in part due to my running the build within the Rush monorepo's build command and it may be producing the error code when finding text in STDERR.

from vitesse.

antfu avatar antfu commented on May 30, 2024

I have switched from Presite to https://github.com/antfu/vite-ssg in the latest Vitesse, which you may want to give a try. Unlike presite, it uses ssr from Vue core to render the content and should be more accurate on hydration and faster build.

And if you believe it's Presite's problem with your configured env, you can open an issue there.

from vitesse.

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.