umami/next.config.js

36 lines
609 B
JavaScript
Raw Normal View History

2020-07-17 10:03:38 +02:00
require('dotenv').config();
const pkg = require('./package.json');
2020-07-17 10:03:38 +02:00
module.exports = {
env: {
VERSION: pkg.version,
},
2020-09-27 05:46:20 +02:00
serverRuntimeConfig: {
PROJECT_ROOT: __dirname,
},
2020-07-17 10:03:38 +02:00
webpack(config) {
config.module.rules.push({
test: /\.svg$/,
issuer: {
test: /\.js$/,
},
use: ['@svgr/webpack'],
});
return config;
},
async headers() {
return [
{
source: '/umami.js',
headers: [
{
key: 'Cache-Control',
value: 'public, max-age=2592000', // 30 days
},
],
},
]
},
2020-07-17 10:03:38 +02:00
};