forked from xitanggg/open-resume
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnext.config.js
More file actions
18 lines (17 loc) · 718 Bytes
/
next.config.js
File metadata and controls
18 lines (17 loc) · 718 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/** @type {import('next').NextConfig} */
const nextConfig = {
// Nextjs has an issue with pdfjs-dist which optionally uses the canvas package
// for Node.js compatibility. This causes a "Module parse failed" error when
// building the app. Since pdfjs-dist is only used on client side, we disable
// the canvas package for webpack
// https://github.com/mozilla/pdf.js/issues/16214
output: 'standalone',
webpack: (config) => {
// Setting resolve.alias to false tells webpack to ignore a module
// https://webpack.js.org/configuration/resolve/#resolvealias
config.resolve.alias.canvas = false;
config.resolve.alias.encoding = false;
return config;
},
};
module.exports = nextConfig;