From b83874ff64ac45382d0d782cd363047bc147e9a2 Mon Sep 17 00:00:00 2001 From: Alexandr Kazachenko Date: Wed, 1 Nov 2023 14:31:28 +0600 Subject: [PATCH] chore: add iife bundle for widget-lib --- libs/widget-lib/package.json | 2 +- libs/widget-lib/vite.config.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libs/widget-lib/package.json b/libs/widget-lib/package.json index cda3940cf3..29fba820a7 100644 --- a/libs/widget-lib/package.json +++ b/libs/widget-lib/package.json @@ -1,6 +1,6 @@ { "name": "@cowprotocol/widget-lib", - "version": "0.1.1", + "version": "0.1.2", "type": "commonjs", "description": "CoW Swap Widget Library. Allows you to easily embed a CoW Swap widget on your website.", "main": "index.js", diff --git a/libs/widget-lib/vite.config.ts b/libs/widget-lib/vite.config.ts index 22e52d0352..949300bad1 100644 --- a/libs/widget-lib/vite.config.ts +++ b/libs/widget-lib/vite.config.ts @@ -55,11 +55,11 @@ export default defineConfig(({ command }) => { lib: { // Could also be a dictionary or array of multiple entry points. entry: 'src/index.ts', - name: 'widget-lib', + name: 'cowSwapWidget', fileName: 'index', // Change this to the formats you want to support. // Don't forgot to update your package.json as well. - formats: ['es', 'cjs'], + formats: ['es', 'cjs', 'iife'], }, rollupOptions: { // External packages that should not be bundled into your library.