UNPKG

@cardano-foundation/cardano-connect-with-wallet-core

Version:

Framework-independent CIP-0030 wrapper functions that allow a smooth build of wallet interaction components

49 lines (46 loc) 1.05 kB
const webpack = require('webpack'); const path = require('path'); const { CleanWebpackPlugin } = require('clean-webpack-plugin'); const config = { mode: 'production', entry: path.resolve(__dirname, 'index.ts'), output: { path: path.resolve(__dirname, 'dist'), filename: 'index.js', library: 'CardanoConnectWithWalletCore', libraryTarget: 'umd', globalObject: 'this', }, devtool: 'source-map', module: { rules: [ { test: /\.(js|mjs|jsx|ts|tsx)$/, exclude: /node_modules/, use: { loader: 'babel-loader', options: { presets: [ '@babel/preset-env', ['@babel/preset-typescript', { allowNamespaces: true }], ], }, }, }, ], }, resolve: { extensions: ['.js', '.ts'], fallback: { fs: false, }, }, plugins: [ new webpack.ProgressPlugin(), new CleanWebpackPlugin({ verbose: true, cleanStaleWebpackAssets: true, }), ], }; module.exports = config;