ente/next.config.js

26 lines
660 B
JavaScript
Raw Normal View History

2020-10-03 14:21:56 +00:00
const withBundleAnalyzer = require('@next/bundle-analyzer')({
enabled: process.env.ANALYZE === 'true',
});
2021-06-15 19:07:01 +00:00
const withWorkbox = require('@ente-io/next-with-workbox');
2021-06-07 10:45:46 +00:00
const { withSentryConfig } = require('@sentry/nextjs');
2021-03-08 11:59:14 +00:00
2021-06-15 09:07:32 +00:00
const cp = require('child_process');
const gitSha = cp.execSync('git rev-parse --short HEAD', {
cwd: __dirname,
encoding: 'utf8',
});
2021-03-08 11:59:14 +00:00
2021-06-07 10:45:46 +00:00
module.exports = withSentryConfig(withWorkbox(withBundleAnalyzer({
future: {
webpack5: true,
},
env: {
2021-06-15 09:07:32 +00:00
SENTRY_RELEASE: gitSha,
},
2021-05-23 14:25:48 +00:00
workbox: {
2021-06-07 05:34:41 +00:00
swSrc: 'src/serviceWorker.js',
2021-06-15 05:03:35 +00:00
exclude: [/manifest\.json$/i],
2021-05-23 14:25:48 +00:00
},
2021-06-15 09:07:32 +00:00
})), { release: gitSha });