Skip to content

Latest commit

 

History

History

wrangler-rollup

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

wrangler-rollup starter

This is an official toucan-js starter that uses wrangler to manage workflows, rollup to bundle code, and @sentry/rollup-plugin to upload sourcemaps to Sentry.

Prerequisites

  • yarn installed globally.
    • Run yarn to install all packages in this project.
  • Cloudflare account.
    • Run yarn wrangler login to associate wrangler with your Cloudflare account.
  • Sentry account.
    • Create a new Sentry project. Choose javascript as the platform.

Client setup

You will need to obtain Sentry DSN for your Sentry project. Once you have it, update SENTRY_DSN variable in wrangler.toml with your value.

[vars]
SENTRY_DSN = "https://123:[email protected]/123"

Sourcemaps setup

If you want to upload sourcemaps, you need to obtain 3 values and set them as environment variables.

// This is your organization slug, you can find it in Settings in Sentry dashboard
export SENTRY_ORG="..."
// Your project name
export SENTRY_PROJECT="..."
// Auth tokens can be obtained from https://sentry.io/settings/account/api/auth-tokens/ and need `project:releases` and `org:read` scopes
export SENTRY_AUTH_TOKEN="..."

Deployment

yarn deploy

Development

yarn start

Runs the worker locally.