Files
TheGame/packages/web/next.config.js
δυς 81883f940e Miscellaneous changes pulled from #1078 (#1115)
​#1078 is at about 4,000 lines changed and includes both code implementing features and unrelated functional and stylistic changes. This set of changes is about ⅓ of the total and should be largely independent.

These changes include:

* have Dependabot ignore `patch` version changes
* switch the cache invalidation Hasura action to asynchronous
* add a uniqueness constraint on the combination of player and skill ids
* print a comprehensible error message in the db seeding script on network errors
* add a mutex on the account creation process & allow it to happen only once *(subsequent runs were failing b/c of the uniqueness constraint on the ETH address & returning `null` (closes #1098))
* adds some more profile editing related types
* renames `HighLow7dType` to `HighLowType`
* refactors the `ColorBar` component to include links to a color explanation
* replaces `fake-tag`'s `gql` string identifier with the dependency-free `/* GraphQL */`
* rename `lib/hooks/useUserXp.ts` to `useUserXP.ts`
* fixed some typings to remove `any`s
* bumped some library versions & fixed the version numbers of some others
2022-02-08 06:01:06 -05:00

72 lines
1.7 KiB
JavaScript

const withImages = require('next-images');
const withTM = require('next-transpile-modules')(['react-timezone-select']);
module.exports = withTM(
withImages({
async redirects() {
return [
{
source: '/',
destination: '/community/players',
permanent: false,
},
{
source: '/players',
destination: '/community/players',
permanent: false,
},
{
source: '/patrons',
destination: '/community/patrons',
permanent: false,
},
{
source: '/guilds',
destination: '/community/guilds',
permanent: false,
},
];
},
async rewrites() {
return [
{
source: '/metagame/feed',
destination: 'https://metagame.substack.com/feed',
},
];
},
future: {
webpack5: true,
},
webpack: (config, { isServer, webpack }) => {
if (!isServer) {
config.plugins.push(
// jsdom is required for draft-js SSR only
new webpack.IgnorePlugin(/jsdom$/),
);
config.resolve.fallback = {
fs: false,
net: false,
http: require.resolve('stream-http'),
os: require.resolve('os-browserify/browser'),
https: require.resolve('https-browserify'),
child_process: false,
stream: require.resolve('stream-browserify'),
'browserify-zlib': false,
zlib: false,
crypto: require.resolve('crypto-browserify'),
path: false,
tls: false,
};
}
config.plugins.push(
new webpack.ProvidePlugin({ Buffer: ['buffer', 'Buffer'] }),
);
return config;
},
}),
);