Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ DATABASE_URL="mysql://YOUR_MYSQL_URL_HERE?ssl={"rejectUnauthorized":true}"
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY="pk_test_"
CLERK_SECRET_KEY="sk_test_"

# React email (resend)
# React email (resend)
# Resend API Key found at https://resend.com/api-keys
RESEND_API_KEY="re_"
# We need to register a domain with Resend to send emails from
Expand All @@ -41,11 +41,14 @@ STRIPE_API_KEY="sk_test_"
# Stripe Webhook Secret found at https://dashboard.stripe.com/test/webhooks/create?endpoint_location=local
# This need to replaced with the webhook secret for your webhook endpoint in production
STRIPE_WEBHOOK_SECRET="whsec_"
# Stripe Product and Price IDs for your created products
# Stripe Product and Price IDs for your created products
# found at https://dashboard.stripe.com/test/products
STRIPE_STD_MONTHLY_PRICE_ID="price_"
STRIPE_PRO_MONTHLY_PRICE_ID="price_"

# EasyPost
EASYPOST_API_KEY="•••••••••

# Optional
# OpenAI API Key
OPENAI_API_KEY="sk-"
33 changes: 33 additions & 0 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,29 @@ const { withContentlayer } = require("next-contentlayer")
*/
import("./src/env.mjs")

// Work around because EasyPost introduces hexoid error related to FormidableJs
// Discussed here: https://github.com/auth0/node-auth0/issues/657#issuecomment-928083729
/**
* @param {import("webpack").Configuration} config
*/
function applyCustomWebpackConfig(config) {
config.resolve = config.resolve || {}
config.resolve.alias = config.resolve.alias || {}

const aliases = {
'formidable': false,
'coffee-script': false,
'vm2': false,
'yargs': false,
'colors': false,
'keyv': false
}

Object.assign(config.resolve.alias, aliases)

return config
}

/** @type {import("next").NextConfig} */
const nextConfig = {
pageExtensions: ["tsx", "mdx", "ts", "js"],
Expand Down Expand Up @@ -34,6 +57,16 @@ const nextConfig = {
// Already doing linting and typechecking as separate tasks in CI
eslint: { ignoreDuringBuilds: true },
typescript: { ignoreBuildErrors: true },

// Work around because EasyPost introduces hexoid error related to FormidableJs
/**
* @param {import("webpack").Configuration} config
*/
webpack: (config) => {
// Apply custom Webpack configurations
return applyCustomWebpackConfig(config)
}
}

module.exports = withContentlayer(nextConfig)

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"dependencies": {
"@clerk/nextjs": "^4.29.4",
"@clerk/themes": "^1.7.9",
"@easypost/api": "^6.8.2",
"@hookform/resolvers": "^3.3.4",
"@loglib/tracker": "^0.8.0",
"@planetscale/database": "^1.14.0",
Expand Down
Loading