-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnext.config.js
More file actions
37 lines (35 loc) · 1.14 KB
/
next.config.js
File metadata and controls
37 lines (35 loc) · 1.14 KB
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
const withPlugins = require('next-compose-plugins');
const withImages = require('next-images');
const withBundleAnalyzer = require('@next/bundle-analyzer')({
enabled: process.env.ANALYZE === 'true',
});
const DuplicatePackageCheckerPlugin = require('duplicate-package-checker-webpack-plugin')
const path = require('path');
const isDev = process.env.NODE_ENV === 'development';
module.exports = withPlugins([
[withBundleAnalyzer],
[withImages]
], {
webpack: (config, { buildId, dev, isServer, defaultLoaders, webpack }) => {
// config.plugins.push(new DuplicatePackageCheckerPlugin())
config.resolve.alias['fast-deep-equal'] = path.resolve(
__dirname,
'node_modules',
'fast-deep-equal'
)
return config
},
basePath: isDev ? '' : '/formify',
poweredByHeader: false,
reactStrictMode: true,
productionBrowserSourceMaps: true,
env: {
NEXT_PUBLIC_HOST: isDev
? 'http://localhost:3000'
: 'https://textcode.me/formify',
NEXT_PUBLIC_ANALYITICS_ID: isDev ? '' : 'UA-98491944-6'
},
images: {
domains: ['textcode.me']
}
})