Skip to content

matthiashader/poc_ssr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gatsby

Proof of concept server side rendering in a gatsby example

Main Changes:

  1. Stencil

    (stencil.config.ts)

     # 
     {
       type: 'dist-hydrate-script',
       dir: 'hydrate'
     },

    (package.json)

     "files": [
     "dist/",
     "loader/",
     "hydrate/"
     ],
  2. Gatsby:

    const { defineCustomElements } = require("pocstencilssr/loader");
    defineCustomElements();
    import { Config } from '@stencil/core';
    
    export const config: Config = {
    namespace: 'pocstencilssr',
    outputTargets: [
    {
    type: 'dist',
    esmLoaderPath: '../loader',
    },
    {
    type: 'dist-custom-elements',
    },
    {
    type: 'docs-readme',
    },
    {
    type: 'www',
    serviceWorker: null, // disable service workers
    },
    {
    type: 'dist-hydrate-script',
    dir: 'hydrate'
    },
    ],
    testing: {
    browserHeadless: "new",
    },
    };

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages