<commit_before>process.env.BABEL_ENV = process.env.BABEL_ENV || "production";
process.env.NODE_ENV = process.env.NODE_ENV || "production";

require("soya-next/config/default");

process.on("unhandledRejection", err => {
  throw err;
});

const { appDir } = require("../config/paths");
const { join } = require("path");
const nextExport = require("next/dist/export").default;
// @remove-on-eject-begin
const { PHASE_EXPORT } = require("next/constants");
const loadConfig = require("next/dist/server/config").default;

const defaultConf = require("../next.config");
const userConf = loadConfig(PHASE_PRODUCTION_BUILD, appDir);
const conf = defaultConf(userConf);
// @remove-on-eject-end

nextExport(
  appDir,
  {
    silent: false,
    outdir: join(appDir, "out")
  }
  // @remove-on-eject-begin
  , conf
  // @remove-on-eject-begin
);
<commit_msg>fix(export): wrong phase config<commit_after>process.env.BABEL_ENV = process.env.BABEL_ENV || "production";
process.env.NODE_ENV = process.env.NODE_ENV || "production";

require("soya-next/config/default");

process.on("unhandledRejection", err => {
  throw err;
});

const { appDir } = require("../config/paths");
const { join } = require("path");
const nextExport = require("next/dist/export").default;
// @remove-on-eject-begin
const { PHASE_EXPORT } = require("next/constants");
const loadConfig = require("next/dist/server/config").default;

const defaultConf = require("../next.config");
const userConf = loadConfig(PHASE_EXPORT, appDir);
const conf = defaultConf(userConf);
// @remove-on-eject-end

nextExport(
  appDir,
  {
    silent: false,
    outdir: join(appDir, "out")
  }
  // @remove-on-eject-begin
  , conf
  // @remove-on-eject-begin
);

{'fraction_non_alphanumeric': 0.17685076380728554, 'fraction_numerical': 0.0, 'mean_word_length': 4.529220779220779, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7649824', 'n_tokens_mistral': 584, 'n_tokens_neox': 583, 'n_words': 99}