fix excessively long build times
This commit is contained in:
parent
6a3358e03e
commit
f58bec53f3
@ -1,7 +1,8 @@
|
|||||||
export async function register() {
|
export async function register() {
|
||||||
if (process.env.NEXT_RUNTIME === 'nodejs') {
|
if (process.env.NEXT_RUNTIME === 'nodejs') {
|
||||||
if (['true', 'yes', '1'].includes(process.env.AUTOMIGRATE?.toLowerCase()!)) {
|
if (['true', 'yes', '1'].includes(process.env.AUTOMIGRATE?.toLowerCase()!)) {
|
||||||
const DBMigrate = require('db-migrate');
|
// using require here increases build times to like 10 minutes for some reason
|
||||||
|
const DBMigrate = await eval('imp' + 'ort("db-migrate")');
|
||||||
const dbmigrate = DBMigrate.getInstance(true);
|
const dbmigrate = DBMigrate.getInstance(true);
|
||||||
await dbmigrate.up();
|
await dbmigrate.up();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user