-
Notifications
You must be signed in to change notification settings - Fork 131
Expand file tree
/
Copy pathnext.config.mjs
More file actions
61 lines (56 loc) · 1.35 KB
/
next.config.mjs
File metadata and controls
61 lines (56 loc) · 1.35 KB
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
import { createRequire } from 'node:module';
import path from 'node:path';
import createNextIntlPlugin from 'next-intl/plugin';
const require = createRequire(import.meta.url);
const { version: appVersion } = require('./package.json');
const withNextIntl = createNextIntlPlugin('./src/i18n/request.ts');
/** @type {import("next").NextConfig} */
const resolveFromRoot = target => path.resolve(process.cwd(), target);
const shaderLoader = resolveFromRoot('loaders/glsl-loader.cjs');
const nextConfig = {
env: {
NEXT_PUBLIC_APP_VERSION: appVersion,
},
typescript: {
ignoreBuildErrors: true,
},
devIndicators: false,
turbopack: {
resolveAlias: {
'@': resolveFromRoot('src'),
},
rules: {
'*.svg': {
loaders: ['@svgr/webpack'],
as: '*.js',
},
'*.glsl': {
loaders: [shaderLoader],
as: '*.js',
},
'*.vs': {
loaders: [shaderLoader],
as: '*.js',
},
'*.fs': {
loaders: [shaderLoader],
as: '*.js',
},
'*.vert': {
loaders: [shaderLoader],
as: '*.js',
},
'*.frag': {
loaders: [shaderLoader],
as: '*.js',
},
},
},
rewrites: async () => [
{
source: '/u.js',
destination: 'https://cloud.umami.is/script.js',
},
],
};
export default withNextIntl(nextConfig);