This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"names": [ | |
"goldstack-ci-test-server-side-rendering-1665262198346--__index.map" | |
], | |
"generatedName": "-__index.63d7f8a9e4e613831f8e7ee052143f64.map.json" | |
}, | |
{ | |
"names": [ | |
"goldstack-ci-test-server-side-rendering-1665262198346--__index-bundle.js" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
return { | |
plugins: [ | |
ignorePlugin({ ignore: ['ui'] }), | |
cssPlugin({ | |
excludeCSSInject: !args.includeCss, | |
cssConfig: { | |
plugins: [], | |
}, | |
}), | |
pnpPlugin(), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
return { | |
plugins: [ | |
ignorePlugin({ ignore: ['server'] }), | |
cssPlugin({ | |
excludeCSSInject: true, | |
onCSSGenerated: args.onCSSGenerated, | |
}), | |
pnpPlugin(), | |
], | |
bundle: true, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"lambdas": { | |
"ANY /": { | |
"function_name": "goldstack-ci-test-server-side-rendering-1665262198346--__index", | |
"route": "ANY /" | |
}, | |
"ANY /posts": { | |
"function_name": "goldstack-ci-test-server-side-rendering-1665262198346-posts", | |
"route": "ANY /posts" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
resource "aws_lambda_function" "this" { | |
for_each = var.lambdas | |
function_name = lookup(each.value, "function_name", null) | |
filename = data.archive_file.empty_lambda.output_path | |
handler = "lambda.handler" | |
runtime = "nodejs16.x" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as render from './../server/render'; | |
export const handler: SSRHandler = async (event, context) => { | |
return render.performRender(event); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* esbuild-ignore ui */ | |
import { renderPage } from './../render'; | |
import fs from 'fs'; | |
export async function performRender({ | |
event, | |
}: { | |
event: APIGatewayProxyEventV2; | |
}): Promise<APIGatewayProxyResultV2> { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import { SSRHandler } from '@goldstack/template-ssr'; | |
import { renderPage, hydrate } from './../render'; | |
const Posts = (props: { posts: string[] }): JSX.Element => { | |
return ( | |
<> | |
<p>Posts:</p> | |
{props.posts.map((p, idx) => ( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
return <div className={styles.myclass}></div>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import styles from './MyComponent.module.css'; |
NewerOlder