-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathnext.config.js
56 lines (51 loc) · 1.52 KB
/
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
// eslint-disable-next-line @typescript-eslint/no-var-requires
const path = require('path');
module.exports = {
cssModules: true,
// // optional
modifyVars: { '@primary-color': '#0000bd' },
trailingSlash: true,
watchOptions: {
ignored: ['node_modules', 'public/static'],
},
webpack(config) {
// Fixes npm packages that depend on `fs` module
config.resolve.fallback = {
fs: false,
crypto: false,
stream: false,
os: false,
http: false,
https: false,
path: false,
};
config.module.rules.push(
{
test: /\.(png|jpg|gif|eot|ttf|woff|woff2)$/,
use: {
loader: 'url-loader',
options: {
limit: 100000,
},
},
},
{
test: /\.svg$/,
use: ['@svgr/webpack'],
},
// all files with a `.ts` or `.tsx` extension will be handled by `ts-loader`
{
test: /\.ts?$/,
options: {
allowTsInNodeModules: true,
compilerOptions: {
noEmit: false,
},
},
include: [path.resolve(__dirname, 'node_modules/@tracer-protocol/perpetual-pools-contracts')],
loader: 'ts-loader',
},
);
return config;
},
};