mirror of
https://github.com/kremalicious/umami.git
synced 2024-11-15 17:55:08 +01:00
39 lines
790 B
JavaScript
39 lines
790 B
JavaScript
require('dotenv').config();
|
|
const pkg = require('./package.json');
|
|
|
|
module.exports = {
|
|
env: {
|
|
currentVersion: pkg.version,
|
|
loginDisabled: process.env.DISABLE_LOGIN,
|
|
updatesDisabled: process.env.DISABLE_UPDATES,
|
|
telemetryDisabled: process.env.DISABLE_TELEMETRY,
|
|
},
|
|
basePath: process.env.BASE_PATH,
|
|
output: 'standalone',
|
|
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
|
|
},
|
|
],
|
|
},
|
|
];
|
|
},
|
|
};
|