-
Notifications
You must be signed in to change notification settings - Fork 2
/
next.config.js
37 lines (36 loc) · 879 Bytes
/
next.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/* eslint-disable global-require */
const withOptimizedImages = require('next-optimized-images');
const withVideos = require('next-videos');
module.exports = withOptimizedImages(withVideos({
async headers() {
return [{
source: '/(.*)',
headers: [
{
key: 'Referrer-Policy',
value: (process.env.NODE_ENV === 'development')
? 'no-referrer-when-downgrade'
: 'strict-origin-when-cross-origin',
},
],
}];
},
assetDirectory: 'static',
webpack(config, { isServer }) {
if (isServer) {
require('./scripts/generate-sitemap');
}
config.module.rules.push({
test: /\.(mp3|wav|mpe?g)$/i,
use: [
{
loader: 'url-loader',
options: {
name: '[name]-[hash].[ext]',
},
},
],
});
return config;
},
}));