Open n3g2 opened 5 years ago
There is no reproducible demo.
I think it's caused here. https://github.com/stereobooster/react-snap/blob/master/index.js#L628-L630
index.html
copied to 200.html
and 200.html
used as indicator if react-snap
already was executed over this code. To change this behaviour we would need to introduce alternative ways to check it, for example .react-snap-was-here
. Also we will need to throw errors on 404 in crawler, if there is no fallback page (no 200.html
).
I already have a fallback page create by myself, so I don't need fallback pages create by react-snap. Next, there is no need for a crawl marker. Each crawl can be recorded in memory. If you must create indicator, you can generate map files. like project root/.react-snap/craw.json.
Indicator required to prevent double run of react-snap over the same source, which can cause unexpected issues, so it should be placed together with target folder.
Bug Report
Current Behavior "reactSnap": { "source": "dist/template/cash", "include": [ "/cashTasks.html" ], "crawl": false, "minifyHtml": { "collapseWhitespace": false, "removeComments": false } } Error: ENOENT: no such file or directory, open 'path to/dist/template/cash/index.html'
Expected behavior/code I expect to read: /dist/template/cash/cashTasks.html
https://github.com/stereobooster/react-snap/issues/347