oxen-website/next.config.js

32 lines
757 B
JavaScript
Raw Normal View History

2021-01-31 11:02:19 +01:00
/* eslint-disable @typescript-eslint/no-var-requires */
2021-01-22 03:43:42 +01:00
const withPlugins = require('next-compose-plugins');
const withFonts = require('next-fonts');
const withSvgr = require('next-svgr');
const nextConfig = {
webpack(config) {
const rules = [{}];
return {
...config,
module: {
...config.module,
rules: [...config.module.rules, ...rules],
},
node: {
fs: 'empty',
},
};
},
env: {
2021-01-31 11:02:19 +01:00
CONTENTFUL_SPACE_ID: process.env.CONTENTFUL_SPACE_ID,
CONTENTFUL_ACCESS_TOKEN: process.env.CONTENTFUL_ACCESS_TOKEN,
2021-01-22 03:43:42 +01:00
},
};
2021-02-12 06:37:44 +01:00
const withTM = require('next-transpile-modules')(['react-use'], {
unstable_webpack5: true,
});
module.exports = withPlugins([withFonts, withSvgr, withTM], nextConfig);