2020-08-01 21:25:24 +03:00
|
|
|
const path = require("path");
|
|
|
|
const dirPath = path.join(__dirname);
|
2020-11-25 21:13:24 +03:00
|
|
|
|
2021-08-20 23:42:38 +03:00
|
|
|
if (process.env.NODE_ENV !== "production") {
|
|
|
|
require("@babel/register")({
|
|
|
|
presets: [
|
|
|
|
[require.resolve("@babel/preset-env")],
|
|
|
|
[
|
|
|
|
require.resolve("next/babel"),
|
|
|
|
{
|
|
|
|
"preset-env": {},
|
|
|
|
"transform-runtime": {},
|
|
|
|
"styled-jsx": {},
|
|
|
|
"class-properties": {},
|
|
|
|
},
|
|
|
|
],
|
2020-07-08 00:35:38 +03:00
|
|
|
],
|
2021-08-20 23:42:38 +03:00
|
|
|
plugins: [
|
|
|
|
[
|
|
|
|
require.resolve("babel-plugin-module-resolver"),
|
|
|
|
{
|
|
|
|
alias: {
|
|
|
|
"~": dirPath,
|
|
|
|
},
|
2020-08-01 21:25:24 +03:00
|
|
|
},
|
2021-08-20 23:42:38 +03:00
|
|
|
],
|
2020-08-01 21:25:24 +03:00
|
|
|
],
|
2021-08-20 23:42:38 +03:00
|
|
|
ignore: ["node_modules", ".next"],
|
|
|
|
});
|
|
|
|
}
|
2020-02-19 09:30:47 +03:00
|
|
|
|
2020-08-01 21:25:24 +03:00
|
|
|
module.exports = require("./server.js");
|