-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathnext.config.js
More file actions
42 lines (35 loc) · 919 Bytes
/
next.config.js
File metadata and controls
42 lines (35 loc) · 919 Bytes
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
const path = require('path')
const { withPlausibleProxy } = require('next-plausible')
let config = {
webpack: (config, { isServer }) => {
return {
...config,
experiments: {
...config.experiments,
topLevelAwait: true,
},
resolve: {
...config.resolve,
fallback: {
...config.resolve.fallback,
module: false,
},
alias: isServer
? config.resolve.alias
: {
...config.resolve.alias,
fs: path.resolve(__dirname, 'alias/fs'),
'fs-extra': path.resolve(__dirname, 'alias/fs-extra'),
},
},
module: {
...config.module,
noParse: [require.resolve('typescript/lib/typescript.js')],
},
}
},
}
config = withPlausibleProxy({
customDomain: 'https://analytics.cryptostats.community',
})(config)
module.exports = config