Fix webpack loader for knex migrations so it works with knex 0.15.2

Signed-off-by: Pablo Carranza Velez <pablo@balena.io>
This commit is contained in:
Pablo Carranza Velez 2018-12-07 16:00:19 -03:00
parent 7854c48f5a
commit 35e11de69d

View File

@ -4,6 +4,6 @@
module.exports = function (source) {
return source
.toString()
.replace(/require\(_path2\.default\.join\(_?this\._absoluteConfigDir\(\), name\)\);/g, "require('./migrations/' + name);")
.replace("require(directory + '/' + name);", "require('./migrations/' + name);")
.replace("require(_path2.default.join(this._absoluteConfigDir(), name));", "require('./migrations/' + name);")
}