forked from devfile/landing-page
-
Notifications
You must be signed in to change notification settings - Fork 0
/
next.config.js
29 lines (28 loc) · 866 Bytes
/
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
const typescriptIsTransformer = require('typescript-is/lib/transform-inline/transformer').default;
const withPlugins = require('next-compose-plugins');
const withImages = require('next-images');
const withTM = require('next-transpile-modules')([
'@patternfly/react-core',
'@patternfly/react-styles',
]);
module.exports = withPlugins([withTM, withImages], {
webpack: (config) => {
config.module.rules.push({
test: /\.ts$/,
exclude: /node_modules/,
loader: 'ts-loader',
options: {
getCustomTransformers: (program) => ({
before: [typescriptIsTransformer(program)],
}),
},
});
return config;
},
basePath: process.env.NEXT_BASE_PATH || '',
publicRuntimeConfig: {
analyticsWriteKey: process.env.ANALYTICS_WRITE_KEY || '',
segmentClientId: 'landing-page',
},
swcMinify: true,
});