Closed janosh closed 3 years ago
You can already programmatically construct the command line arguments you pass to sapper export. At this stage in Sapper's lifecycle, we're not going to be adding many new features at all, and definitely not those that already have another pretty simple way to achieve them.
It's a little bit of a hassle. Perhaps you know how to grab console.log
s from a node
script in such a way that they are quoted and can be fed as a single string to another command? Neither of these seem to work
"export": "sapper export --entry $(node getEntryPoints.mjs)",
"export": "sapper export --entry '$(node getEntryPoints.mjs)'",
The first only enters the first item logged in getEntryPoints.mjs
. The second tries to enter
> Crawling http://localhost:3000/$(node/
> Crawling http://localhost:3000/getEntryPoints.mjs)/
Is your feature request related to a problem? Please describe.
sapper export --entry / page1 page2 ...
doesn't scale if you have dozens of pages that wouldn't be reachable in a production build unless explicitly specified and whose slugs change over time.Describe the solution you'd like
I'd like to pass in entry points to the sapper export command programmatically to ensure
sapper export
correctly crawls all pages. Ideally there would be a place in e.g.rollup.config.js
where these could be specified:Describe alternatives you've considered
Currently we're using an invisible list of page links on the landing page to make sure the crawler finds all pages but this is super clunky:
How important is this feature to you?
I think it would make a great addition to Sapper's API and help users deal with an issue that seems to pop up with Sapper quite frequently which is pages missing from production builds.