autumncicada
autumncicada
Explore posts from servers
CDCloudflare Developers
Created by autumncicada on 5/15/2024 in #workers-help
How to add jsx support for React-email in workers?
I can't run my worker in dev (or remote) since I'm using JSX to render my emails. How would I go about fixing this? I'm using the renderAsync method so it's not a node issue.
2 replies
CDCloudflare Developers
Created by autumncicada on 5/11/2024 in #workers-help
When running wrangler dev are HTTP request headers like CF-Connecting-IP supposed to be added?
I'm testing an implementation of a rate limiter built using DOs and CF-Connecting-IP is not present along with other request headers. Is this supposed to be added in the test environment?
2 replies
CDCloudflare Developers
Created by autumncicada on 5/6/2024 in #pages-help
How do I setup a github action to deploy to production and not preview?
Below is my current github action which does work for preview deployments. I'd like to be able to deploy from production for it.
name: Deploy
on:
push:
branches:
- 'releases/**'
jobs:
deploy:
runs-on: ubuntu-latest
permissions:
contents: read
deployments: write
steps:
- name: Checkout code
uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: actions/setup-node@v3
with:
node-version: 20
cache: 'pnpm'
- name: Install dependencies
run: pnpm install --frozen-lockfile
#
# Build web app
#
- name: Build web
run: pnpm run pages:build
#
# Deploy to Cloudflare Pages
#
- name: Publish
uses: cloudflare/pages-action@1
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: project-name
directory: .vercel/output/static
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
name: Deploy
on:
push:
branches:
- 'releases/**'
jobs:
deploy:
runs-on: ubuntu-latest
permissions:
contents: read
deployments: write
steps:
- name: Checkout code
uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: actions/setup-node@v3
with:
node-version: 20
cache: 'pnpm'
- name: Install dependencies
run: pnpm install --frozen-lockfile
#
# Build web app
#
- name: Build web
run: pnpm run pages:build
#
# Deploy to Cloudflare Pages
#
- name: Publish
uses: cloudflare/pages-action@1
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: project-name
directory: .vercel/output/static
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
3 replies
CDCloudflare Developers
Created by autumncicada on 5/6/2024 in #pages-help
Can't figure out how to promote a preview environment to production
No description
9 replies
CDCloudflare Developers
Created by autumncicada on 5/6/2024 in #workers-help
Can't figure out how to promote a preview environment to production
No description
6 replies
SSolidJS
Created by autumncicada on 7/16/2023 in #support
Are there any performance implications with using the style prop?
As the title says I'm wondering if there are any performance implications with using the style prop. For example: Can it result in flashing as styles are rendered?
2 replies
SSolidJS
Created by autumncicada on 7/13/2023 in #support
If I'm using createResource, why would I use Suspense?
For example if I have
function Loader() {
const [resource] = createResource(fetchResourceFn);
return <Suspense fallback={<div>Loading....</div>}>
<ResourceRenderer resource={resource()} />
</Suspense>;
}
function Loader() {
const [resource] = createResource(fetchResourceFn);
return <Suspense fallback={<div>Loading....</div>}>
<ResourceRenderer resource={resource()} />
</Suspense>;
}
This doesn't pass typescript type checking because you still need to check if resource() is undefined or not, even though Suspense shouldn't render the ResourceRenderer until createResource is finished with its async request?
8 replies
SSolidJS
Created by autumncicada on 7/6/2023 in #support
Difficulties using Pdfjs-dist with SolidStart
I'm trying to use Pdfjs-dist with SolidStart. It works in developer mode but when I try to create a production build it fails with the error in the build-err.txt file I've attached. I've also attached the PdfViewer component code and the route I'm loading the PdfViewer into. I'm already using unstable_clientOnly to load in the module.
4 replies