для меня, работающего с es6, я делаю
import Sequelize from 'sequelize';
const db = new Sequelize(process.env.DB_NAME, process.env.DB_USER, process.env.DB_PASSWORD, {
host: process.env.DB_HOST,
dialect: 'mysql',
pool: {
max: 5,
min: 0,
idle: 10000
},
flags: '-FOUND_ROWS',
logging: false
});
Мой файл babel.config. js
const presets = [
"@babel/preset-env",
];
const plugins = [
"@babel/plugin-syntax-dynamic-import",
"@babel/plugin-proposal-class-properties",
"@babel/plugin-transform-object-assign",
"@babel/plugin-transform-classes",
[
"@babel/plugin-transform-runtime",
{
"regenerator": true
}
]
]
module.exports = {presets, plugins};