hensei-web/next.config.js
2022-01-31 23:34:38 -08:00

29 lines
645 B
JavaScript

/** @type {import('next').NextConfig} */
const path = require('path')
module.exports = {
reactStrictMode: true,
sassOptions: {
prependData: '@import "variables";',
includePaths: [path.join(__dirname, 'styles')],
},
async rewrites() {
return [
{
source: '/',
destination: '/new'
}
]
},
webpack(config) {
config.module.rules.push({
test: /\.svg$/,
use: ["@svgr/webpack"]
});
config.module.rules[2].oneOf.forEach((one) => {
if (!`${one.issuer?.and}`.includes('_app')) return;
one.issuer.and = [path.resolve(__dirname)];
});
return config;
},
};