-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnext.config.js
34 lines (31 loc) · 905 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
const TsconfigPathsPlugin = require("tsconfig-paths-webpack-plugin");
const path = require("path");
// For building on vercel: https://github.com/Automattic/node-canvas/issues/1779
if (
process.env.LD_LIBRARY_PATH == null ||
!process.env.LD_LIBRARY_PATH.includes(
`${process.env.PWD}/node_modules/canvas/build/Release:`
)
) {
process.env.LD_LIBRARY_PATH = `${
process.env.PWD
}/node_modules/canvas/build/Release:${process.env.LD_LIBRARY_PATH || ""}`;
}
/**
* @type {import('next').NextConfig}
*/
const nextConf = {
// eslint-disable-next-line
webpack: (config, options) => {
if (config.resolve.plugins) {
config.resolve.plugins.push(new TsconfigPathsPlugin());
} else {
config.resolve.plugins = [new TsconfigPathsPlugin()];
}
return config;
},
sassOptions: {
includePaths: [path.join(__dirname, "styles")],
},
};
module.exports = nextConf;