const { wasmLoader } = require('esbuild-plugin-wasm');
module.exports = {
  target: 'esnext',
  plugins: ({ isCJS }) => {
    if (isCJS) {
      return [
        wasmLoader({
          mode: 'deferred',
        }),
      ];
    }

    return [];
  },
}
