Files
tlsn-js/webpack.build.config.js
tsukino e4a8a9c723 feat: upgrade to alpha.6 and new tlsn-wasm prover (#61)
* Revert "chore: release v0.1.0-alpha.6 (#57)"

This reverts commit 292b4263d7.

* parsed json

* add json commitments

* parse json from transcript

* wip

* wip

* wip

* feat: update to alpha.6

* chore: commit wasm pkg directory

* chore: version nump

* fix: test suite for alpha.6

* fix: remove wasm build from ci

* fix: update pnpm lockfile

* fix: remove test:wasm

* fix: linter and add new devDependency
2024-08-12 05:52:19 -04:00

59 lines
1.1 KiB
JavaScript

const webpack = require('webpack');
const path = require('path');
const isProd = process.env.NODE_ENV === 'production';
const envPlugin = new webpack.EnvironmentPlugin({
NODE_ENV: 'development',
});
const rules = [
{
test: /\.tsx?$/,
exclude: [/(node_modules|.webpack)/],
rules: [
{
loader: 'ts-loader',
options: {
configFile: 'tsconfig.json',
transpileOnly: true,
},
},
],
},
{
test: /\.node$/,
use: 'node-loader',
},
];
module.exports = [
{
mode: isProd ? 'production' : 'development',
entry: {
lib: path.join(__dirname, 'src', 'lib.ts'),
},
target: 'webworker',
devtool: 'source-map',
resolve: {
extensions: ['.ts', '.js'],
},
node: {
__dirname: true,
},
module: {
rules: [...rules],
},
output: {
publicPath: '',
path: __dirname + '/build',
filename: `[name].js`,
libraryTarget: 'umd',
globalObject: 'this',
umdNamedDefine: true,
},
plugins: [
envPlugin,
],
},
];