Loader webpack for sequelize
Unanswered
Huyenlong posted this in #help-forum
Hi
i search how to configure the loader module because when i use sequelize like a GET route, i have this bug :
i have this in next.config
Thanks for help
i search how to configure the loader module because when i use sequelize like a GET route, i have this bug :
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this filei have this in next.config
const nextConfig = {
webpack: (config, { isServer, defaultLoaders, pluginOptions }) => {
config.ignoreWarnings = [
{ module: /node_modules\/node-fetch\/lib\/index\.js/ },
{ file: /node_modules\/node-fetch\/lib\/index\.js/ },
];
if (isServer) {
console.log("this is webpack")
config.resolve.fallback = {
"@sequelize/mariadb": false,
"@sequelize/mssql": false,
"@sequelize/mysql": false,
// "@sequelize/postgres": true,
"@sequelize/sqlite3": false,
"@sequelize/db2-ibmi": false,
"@sequelize/db2": false,
"@sequelize/snowflake": false,
"@mapbox": false,
"@sequelize":false
};
}
return config;
},
};Thanks for help