tldraw/apps/www/next.config.js

25 lines
596 B
JavaScript
Raw Normal View History

const withPWA = require('next-pwa')
const withTM = require('next-transpile-modules')
2021-09-04 11:36:47 +00:00
const { GITHUB_ID, GITHUB_API_SECRET, NODE_ENV, VERCEL_GIT_COMMIT_SHA, GA_MEASUREMENT_ID } =
process.env
2021-09-04 12:02:13 +00:00
const isProduction = NODE_ENV === 'production'
module.exports = withTM(['@tldraw/tldraw', '@tldraw/core'])(
withPWA({
reactStrictMode: true,
pwa: {
disable: !isProduction,
dest: 'public',
},
productionBrowserSourceMaps: true,
env: {
NEXT_PUBLIC_COMMIT_SHA: VERCEL_GIT_COMMIT_SHA,
GA_MEASUREMENT_ID,
GITHUB_ID,
GITHUB_API_SECRET,
},
})
)