mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2024-12-22 15:02:23 +00:00
758f3caa48
Change-type: patch
12 lines
354 B
JavaScript
12 lines
354 B
JavaScript
// knex migrations use dynamic requires which break with webpack.
|
|
// This hack makes the migrations directory a constant so that at least we can use webpack contexts for the
|
|
// require.
|
|
module.exports = function (source) {
|
|
return source
|
|
.toString()
|
|
.replace(
|
|
'path.join(absoluteDir, migration.file)',
|
|
`'./migrations/'+migration.file`,
|
|
);
|
|
};
|