Build umd lib for @tornado/contracts

This commit is contained in:
Tornado Contrib 2024-10-06 22:23:56 +00:00
parent 4517393017
commit b9f891644d
Signed by: tornadocontrib
GPG Key ID: 60B4DF1A076C64B1
5 changed files with 34799 additions and 1 deletions

1
dist/contracts.d.ts vendored Normal file

@ -0,0 +1 @@
export * from '@tornado/contracts';

34748
dist/tornadoContracts.umd.js vendored Normal file

File diff suppressed because one or more lines are too long

1
dist/tornadoContracts.umd.min.js vendored Normal file

File diff suppressed because one or more lines are too long

1
src/contracts.ts Normal file

@ -0,0 +1 @@
export * from '@tornado/contracts';

@ -122,5 +122,52 @@ module.exports = [
...commonAlias,
}
},
}
},
{
mode: 'production',
module: {
rules: [esbuildLoader]
},
entry: './src/contracts.ts',
output: {
filename: 'tornadoContracts.umd.js',
path: path.resolve(__dirname, './dist'),
library: 'TornadoContracts',
libraryTarget: 'umd'
},
plugins: [
new NodePolyfillPlugin(),
],
resolve: {
extensions: ['.tsx', '.ts', '.js'],
alias: {
...commonAlias,
}
},
optimization: {
minimize: false,
}
},
{
mode: 'production',
module: {
rules: [esbuildLoader]
},
entry: './src/contracts.ts',
output: {
filename: 'tornadoContracts.umd.min.js',
path: path.resolve(__dirname, './dist'),
library: 'TornadoContracts',
libraryTarget: 'umd'
},
plugins: [
new NodePolyfillPlugin(),
],
resolve: {
extensions: ['.tsx', '.ts', '.js'],
alias: {
...commonAlias,
}
},
},
];