Issue with identifying migration files as input to umzug instance #610
-
In my application, I am bundling my src code into a single file(using Webpack for this) which includes migration code too because I want to run the migrations with the help of an API. I created the Umzug instance below like this
But Umzug is not able to identify the migrations file. so, in the Webpack config file, I included this option
and now it is able to identify the files, but got this error
test-migration.js file code
I am naive to bundling related stuff. can somebody please help in identifying this issue and also can this issue be solved with node.__dirname set to false in webpack config as well? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
webpack/bundling can complicate things - see https://github.com/sequelize/umzug/tree/main/examples/7.bundling-codegen for one way to solve |
Beta Was this translation helpful? Give feedback.
webpack/bundling can complicate things - see https://github.com/sequelize/umzug/tree/main/examples/7.bundling-codegen for one way to solve