Files
js-crypto/scripts/base.config.js
2022-11-22 02:52:49 +02:00

20 lines
513 B
JavaScript

const NodeModulesPolyfills = require('@esbuild-plugins/node-modules-polyfill').default;
const NodeGlobalPolyfills = require('@esbuild-plugins/node-globals-polyfill').default;
const pkg = require('../package.json');
const esmConfig = {
plugins: [
NodeGlobalPolyfills({
process: true,
buffer: true
}),
NodeModulesPolyfills()
],
entryPoints: ['src/index.ts'],
bundle: true,
sourcemap: true,
target: 'esnext',
outfile: pkg.module,
format: 'esm',
};
module.exports = esmConfig;