stereobooster / react-snap

👻 Zero-configuration framework-agnostic static prerendering for SPAs
MIT License
5.04k stars 391 forks source link

How does react-snap support multiple pages? #347

Closed n3g2 closed 5 years ago

n3g2 commented 5 years ago

Now it's just reading index.html. But I have a.html b.html c.html and so on.

stereobooster commented 5 years ago

in package.json

"reactSnap": {
  include: ["/a", "/b"]
}
n3g2 commented 5 years ago

This is my config "reactSnap": { "source": "dist/template/cash", "include": [ "/cashTasks" ], "crawl": false, "minifyHtml": { "collapseWhitespace": false, "removeComments": false } } ... "postbuild": "react-snap"

But got Error: ENOENT: no such file or directory, open 'path to /dist/template/cash/index.html' It read only index.html. How to configure it for to read: /dist/template/cash/cashTasks.html ?

stereobooster commented 5 years ago
"include": [
"/cashTasks.html"
],
n3g2 commented 5 years ago

According to your configuration. "reactSnap": { "source": "dist/template/cash", "include": [ "/cashTasks.html" ], "crawl": false, "minifyHtml": { "collapseWhitespace": false, "removeComments": false } }

This is error report

react-snap

events.js:183 throw er; // Unhandled 'error' event ^

Error: ENOENT: no such file or directory, open 'path to/dist/template/cash/index.html'

I think this is a bug.

stereobooster commented 5 years ago

You can open bug report with reproducible example if you think this is a bug