next.config.js 317 B

12345678910111213
  1. const path = require("path");
  2. const NODE_ENV = process.env.NODE_ENV || "development";
  3. /** @type {import('next').NextConfig} */
  4. const nextConfig = {
  5. webpack: (config, options) => {
  6. config.resolve.alias.data = path.resolve(__dirname, `data/${NODE_ENV}`);
  7. return config;
  8. }
  9. };
  10. module.exports = nextConfig;