ProjectEvergreen / greenwood

Greenwood is your workbench for the web, embracing web standards from the ground up to empower your stack from front to back.
https://www.greenwoodjs.io
MIT License
96 stars 9 forks source link

don't output SSR pages and templates when `prerender` configuration is enabled #1101

Closed thescientist13 closed 1 year ago

thescientist13 commented 1 year ago

Related Issue

resolves #1099

Summary of Changes

  1. Exclude pre-rendered SSR pages from server rendering and bundling
  2. Exclude SSR pages from copying _templates/ if no SSR bundling needed
  3. Add multiple test cases to cover / validate expected behavior

TODO

  1. [x] Add a test case to reproduce / validate the correct behavior
  2. [x] In theory, pre-rendered SSR pages shouldn't even have an index.js generated, so should look into that
  3. [x] Should also verify if the _templates/ directory also needs to get cleaned up