forked from amplience/dc-demostore-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
next.config.js
69 lines (68 loc) · 2.26 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
57
58
59
60
61
62
63
64
65
66
67
68
69
const path = require('path')
module.exports = (phase, { defaultConfig }) => {
return {
webpack: (config, { isServer }) => {
if (!isServer) {
// don't resolve 'fs' module on the client to prevent this error on build --> Error: Can't resolve 'fs'
config.resolve.fallback = {
fs: false,
crypto: false,
http: false,
https: false,
process: false,
assert: false,
stream: false,
constants: false,
path: false,
events: false,
buffer: false,
util: false
}
}
return config;
},
// experimental: { granularChunks: true },
sassOptions: {
includePaths: [path.join(__dirname, 'styles')],
},
images: {
domains: ['qrickit.com', 'elyseo.eu'],
},
rewrites() {
return [
{
source: '/visualization',
destination: '/cms/visualization',
},
{
source: '/visualization/product',
destination: '/cms/visualization/product',
},
{
source: '/visualization/standalone',
destination: '/cms/visualization/standalone',
},
{
source: '/visualization/qr',
destination: '/cms/visualization/qr',
},
{
source: '/visualization/store',
destination: '/cms/visualization/store',
},
{
source: '/timestamp',
destination: '/cms/preview/timestamp',
},
{
source: '/current',
destination: '/cms/preview/current',
},
{
source: '/locale/:locale/currency/:currency',
destination: '/cms/preview/locale/:locale/currency/:currency',
}
]
}
}
}