Giter Site home page Giter Site logo

Support Vite.JS about react-snap HOT 4 OPEN

johannbuscail avatar johannbuscail commented on June 11, 2024 3
Support Vite.JS

from react-snap.

Comments (4)

marcandrews avatar marcandrews commented on June 11, 2024 12

react-snap works with Vite; it's just that the included version of Puppeteer uses Chromium 78 for which your app after building may be incompatible due to unsupported ECMAScript features.

This line is incompatible with puppeteer@>=14 (since puppeteer/puppeteer@6c96011) so you can try using yarn resolutions or similar to force the installation of puppeteer@^13

  // package.json
  "resolutions": {
    "puppeteer": "^13"
  },

This will include Chromium 101 that should improve compatibility.

from react-snap.

eduhsoto avatar eduhsoto commented on June 11, 2024

How resolve your problem? Did you use other library for prerendering?

from react-snap.

Lars418 avatar Lars418 commented on June 11, 2024

I haven't had any problems using react-snap in combination with vite.js. You just need to add "postbuild": "react-snap" to your scripts object and change the source folder to dist inside your package.json:

  "reactSnap": {
    "source": "dist"
  },

from react-snap.

ssxjuan avatar ssxjuan commented on June 11, 2024

React-snap not working on Vite Typescript.-

from react-snap.

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.