Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for migration .js files being ES modules (ESM) #784

Closed
mo opened this issue Jun 11, 2022 · 1 comment
Closed

Add support for migration .js files being ES modules (ESM) #784

mo opened this issue Jun 11, 2022 · 1 comment

Comments

@mo
Copy link

mo commented Jun 11, 2022

When "db-migrate create" is executed it created a new .js file that uses commonjs. However, my project uses ES modules (ESM) i.e. I have "type": "module" in my main package.json file. For this reason I'm interested in one of these two features:

  • Command line switch that makes "db-migrate create" create a .cjs file instead of a .js file.
  • Command line switch that makes "db-migrate create" output an ES module (ESM) with "import" instead of require etc.
@wzrdtales
Copy link
Member

already fixed in #724 (you can use the current latest beta version without worrying)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants