umami/next.config.js
2022-05-24 14:43:19 +02:00

38 lines
660 B
JavaScript

require('dotenv').config();
const pkg = require('./package.json');
module.exports = {
env: {
VERSION: pkg.version,
},
basePath: process.env.BASE_PATH,
experimental: {
outputStandalone: true,
},
eslint: {
ignoreDuringBuilds: true,
},
webpack(config) {
config.module.rules.push({
test: /\.svg$/,
issuer: /\.js$/,
use: ['@svgr/webpack'],
});
return config;
},
async headers() {
return [
{
source: `/(.*\\.js)`,
headers: [
{
key: 'Cache-Control',
value: 'public, max-age=2592000', // 30 days
},
],
},
];
},
};