* chore: bump mockttp from 1.2.2 to 2.0.1 in /web3.js Bumps [mockttp](https://github.com/httptoolkit/mockttp) from 1.2.2 to 2.0.1. - [Release notes](https://github.com/httptoolkit/mockttp/releases) - [Commits](https://github.com/httptoolkit/mockttp/compare/v1.2.2...v2.0.1) --- updated-dependencies: - dependency-name: mockttp dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * fix browser tests Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Justin Starry <justin@solana.com>
		
			
				
	
	
		
			62 lines
		
	
	
		
			1.5 KiB
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			62 lines
		
	
	
		
			1.5 KiB
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
import alias from '@rollup/plugin-alias';
 | 
						|
import babel from '@rollup/plugin-babel';
 | 
						|
import commonjs from '@rollup/plugin-commonjs';
 | 
						|
import json from '@rollup/plugin-json';
 | 
						|
import multi from '@rollup/plugin-multi-entry';
 | 
						|
import nodeResolve from '@rollup/plugin-node-resolve';
 | 
						|
import nodePolyfills from 'rollup-plugin-node-polyfills';
 | 
						|
import replace from '@rollup/plugin-replace';
 | 
						|
 | 
						|
const extensions = ['.js', '.ts'];
 | 
						|
 | 
						|
export default {
 | 
						|
  input: {
 | 
						|
    include: ['test/**/*.test.ts'],
 | 
						|
    exclude: ['test/agent-manager.test.ts', 'test/bpf-loader.test.ts'],
 | 
						|
  },
 | 
						|
  external: ['node-forge', 'http2', '_stream_wrap', 'mockttp'],
 | 
						|
  output: {
 | 
						|
    file: 'test/dist/bundle.js',
 | 
						|
    format: 'es',
 | 
						|
    sourcemap: true,
 | 
						|
  },
 | 
						|
  plugins: [
 | 
						|
    multi(),
 | 
						|
    commonjs(),
 | 
						|
    nodeResolve({
 | 
						|
      browser: true,
 | 
						|
      preferBuiltins: false,
 | 
						|
      extensions,
 | 
						|
      dedupe: ['bn.js', 'buffer'],
 | 
						|
    }),
 | 
						|
    babel({
 | 
						|
      exclude: '**/node_modules/**',
 | 
						|
      extensions,
 | 
						|
      babelHelpers: 'runtime',
 | 
						|
      plugins: ['@babel/plugin-transform-runtime'],
 | 
						|
    }),
 | 
						|
    nodePolyfills(),
 | 
						|
    replace({
 | 
						|
      'process.env.BROWSER': 'true',
 | 
						|
      'process.env.TEST_LIVE': 'true',
 | 
						|
    }),
 | 
						|
    alias({
 | 
						|
      entries: [
 | 
						|
        {
 | 
						|
          find: /^\.\.\/src\/.*\.js$/,
 | 
						|
          replacement: './lib/index.browser.esm.js',
 | 
						|
        },
 | 
						|
      ],
 | 
						|
    }),
 | 
						|
    json(),
 | 
						|
  ],
 | 
						|
  onwarn: function (warning, rollupWarn) {
 | 
						|
    if (warning.code !== 'CIRCULAR_DEPENDENCY' && warning.code !== 'EVAL') {
 | 
						|
      rollupWarn(warning);
 | 
						|
    }
 | 
						|
  },
 | 
						|
  treeshake: {
 | 
						|
    moduleSideEffects: path => path.endsWith('test.ts'),
 | 
						|
  },
 | 
						|
};
 |