-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathnext.config.js
62 lines (59 loc) · 1.55 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
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
const withHashicorp = require('@hashicorp/platform-nextjs-plugin')
const withSwingset = require('swingset')
module.exports = withHashicorp({
transpileModules: [
'swingset',
'@hashicorp/sentinel-embedded',
'@hashicorp/flight-icons',
],
})(
withSwingset({
componentsRoot: 'packages/**/*',
docsRoot: 'docs/*',
})({
eslint: {
// Warning: Dangerously allow production builds to successfully complete even if
// your project has ESLint errors.
ignoreDuringBuilds: true,
},
svgo: { plugins: [{ removeViewBox: false }] },
publicRuntimeConfig: {
SOURCEGRAPH_URL: process.env.SOURCEGRAPH_URL,
},
headers: async () => [
{
source: '/:path*{/}?', // https://github.com/vercel/next.js/issues/14930
headers: [
{
key: 'Content-Security-Policy',
value:
"frame-ancestors 'self' https://design-system-website.vercel.app",
},
],
},
],
images: {
domains: ['www.datocms-assets.com'],
disableStaticImages: false,
},
webpack(config) {
// disable `exports` support for framer-motion. This will cause Webpack to
// fall back to using `module`
config.module.rules.push({
test: (input) => {
return (
input.includes('framer-motion') || input.includes('motion-config')
)
},
resolve: {
exportsFields: [],
},
})
return config
},
})
)