-
Notifications
You must be signed in to change notification settings - Fork 0
/
next.config.js
39 lines (35 loc) · 1.06 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
/** @type {import('next').NextConfig} */
const DuplicatePackageCheckerPlugin = require('duplicate-package-checker-webpack-plugin');
const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer');
const path = require('path');
module.exports = {
reactStrictMode: true,
typescript: {
// !! WARN !!
// Dangerously allow production builds to successfully complete even if
// your project has type errors.
// !! WARN !!
ignoreBuildErrors: true,
},
webpack: (config, { dev, isServer }) => {
// Replace React with Preact only in client production build
if (process.env.ANALYZE) {
config.plugins.push(
new BundleAnalyzerPlugin({
analyzerMode: 'server',
analyzerPort: isServer ? 8888 : 8889,
openAnalyzer: true,
})
);
}
Object.assign(config.resolve.alias, {
...(config.resolve.alias ?? {}),
'@restart/hooks': path.resolve(__dirname, 'node_modules', '@restart/hooks'),
});
return config;
},
images: {
loader: 'imgix',
path: 'https://noop/',
},
};