forked from qwadratic/tvm.codes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnext.config.js
36 lines (31 loc) · 898 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
/** @type {import('next').NextConfig} */
// eslint-disable-next-line @typescript-eslint/no-var-requires
const { withPlausibleProxy } = require('next-plausible')
module.exports = withPlausibleProxy()({
reactStrictMode: true,
serverRuntimeConfig: {
APP_ROOT: __dirname,
},
webpack: (config, options) => {
const { dir, defaultLoaders } = options
config.resolve.extensions.push('.ts', '.tsx')
config.module.rules.push({
test: /\.+(ts|tsx)$/,
include: [dir],
use: [
defaultLoaders.babel,
{ loader: 'ts-loader', options: { transpileOnly: true } },
],
})
config.resolve.fallback = {
fs: false,
stream: false,
crypto: false,
path: false,
process: require.resolve('process/browser'),
assert: require.resolve('assert/'),
events: require.resolve('events/'),
}
return config
},
})