Ignore plugin for esbuild
npm install esbuild-plugin-ignoreIgnorePlugin from webpack(https://webpack.js.org/plugins/ignore-plugin/).
{
// Other esbuild options,
plugins: [
ignorePlugin([
{
resourceRegExp: /pg-native$/,
contextRegExp: /node_modules\/sequelize|node_modules\/pg/
},
{
resourceRegExp: /tedious|sqlite3|mariadb$/,
contextRegExp: /node_modules\/sequelize/
}
])
]
}
``* It's the same as the Webpack 5's plugin of the same name.
* You can refer to example directory for usage.
* It supports both ESM and CommonJS.