umami/next.config.js

38 lines
754 B
JavaScript
Raw Normal View History

2020-07-17 08:03:38 +00:00
require('dotenv').config();
const pkg = require('./package.json');
2020-07-17 08:03:38 +00:00
module.exports = {
env: {
VERSION: pkg.version,
2020-10-04 04:54:21 +00:00
FORCE_SSL: !!process.env.FORCE_SSL,
DISABLE_LOGIN: !!process.env.DISABLE_LOGIN,
2022-02-17 04:58:44 +00:00
TRACKER_SCRIPT_NAME: process.env.TRACKER_SCRIPT_NAME,
2020-09-27 03:46:20 +00:00
},
2020-12-04 06:28:05 +00:00
basePath: process.env.BASE_PATH,
2021-11-22 22:53:36 +00:00
eslint: {
ignoreDuringBuilds: true,
},
2020-07-17 08:03:38 +00:00
webpack(config) {
config.module.rules.push({
test: /\.svg$/,
2021-07-13 03:25:24 +00:00
issuer: /\.js$/,
2020-07-17 08:03:38 +00:00
use: ['@svgr/webpack'],
});
return config;
},
async headers() {
return [
{
source: '/umami.js',
headers: [
{
key: 'Cache-Control',
value: 'public, max-age=2592000', // 30 days
},
],
},
2020-12-04 06:28:05 +00:00
];
},
2020-07-17 08:03:38 +00:00
};