react-static-templates.js 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. import React from 'react'
  2. import universal, { setHasBabelPlugin } from 'react-universal-component'
  3. setHasBabelPlugin()
  4. const universalOptions = {
  5. loading: () => null,
  6. error: props => {
  7. console.error(props.error);
  8. return <div>An error occurred loading this page's template. More information is available in the console.</div>;
  9. },
  10. ignoreBabelRename: true
  11. }
  12. const t_0 = universal(import('__react_static_root__/src/pages/404.js'), universalOptions)
  13. t_0.template = '__react_static_root__/src/pages/404.js'
  14. const t_1 = universal(import('__react_static_root__/src/pages/about.js'), universalOptions)
  15. t_1.template = '__react_static_root__/src/pages/about.js'
  16. const t_2 = universal(import('__react_static_root__/src/pages/blog.js'), universalOptions)
  17. t_2.template = '__react_static_root__/src/pages/blog.js'
  18. const t_3 = universal(import('__react_static_root__/src/pages/index.js'), universalOptions)
  19. t_3.template = '__react_static_root__/src/pages/index.js'
  20. const t_4 = universal(import('__react_static_root__/src/containers/Post'), universalOptions)
  21. t_4.template = '__react_static_root__/src/containers/Post'
  22. // Template Map
  23. export default {
  24. '__react_static_root__/src/pages/404.js': t_0,
  25. '__react_static_root__/src/pages/about.js': t_1,
  26. '__react_static_root__/src/pages/blog.js': t_2,
  27. '__react_static_root__/src/pages/index.js': t_3,
  28. '__react_static_root__/src/containers/Post': t_4
  29. }
  30. // Not Found Template
  31. export const notFoundTemplate = "__react_static_root__/src/pages/404.js"