From e7fd7bc58f98eebffd315ee22c6d7b3e95916573 Mon Sep 17 00:00:00 2001 From: surunzi Date: Sat, 7 Sep 2024 23:20:08 +0800 Subject: [PATCH] release(gallery): v1.0.1 --- index.json | 2 +- src/gallery/CHANGELOG.md | 4 ++++ src/gallery/index.ts | 6 ++++-- src/gallery/package.json | 2 +- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/index.json b/index.json index 136c6b5..9b45d6e 100644 --- a/index.json +++ b/index.json @@ -110,7 +110,7 @@ "gallery": { "icon": true, "dependencies": ["carousel", "image-viewer", "toolbar"], - "version": "1.0.0", + "version": "1.0.1", "style": true, "test": true, "install": false, diff --git a/src/gallery/CHANGELOG.md b/src/gallery/CHANGELOG.md index c0b4e06..c66580e 100644 --- a/src/gallery/CHANGELOG.md +++ b/src/gallery/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.0.1 (7 Sep 2024) + +* fix: esm import + ## 1.0.0 (23 Aug 2024) * feat: zoom in and zoom out diff --git a/src/gallery/index.ts b/src/gallery/index.ts index b208ee8..0364c0d 100644 --- a/src/gallery/index.ts +++ b/src/gallery/index.ts @@ -11,6 +11,7 @@ import types from 'licia/types' import each from 'licia/each' import loadImg from 'licia/loadImg' import fullscreen from 'licia/fullscreen' +import { exportCjs } from '../share/util' /** IOptions */ export interface IOptions extends IComponentOptions { @@ -273,5 +274,6 @@ class Image { } } -module.exports = Gallery -module.exports.default = Gallery +if (typeof module !== 'undefined') { + exportCjs(module, Gallery) +} diff --git a/src/gallery/package.json b/src/gallery/package.json index 04280d3..4932ed0 100644 --- a/src/gallery/package.json +++ b/src/gallery/package.json @@ -1,6 +1,6 @@ { "name": "gallery", - "version": "1.0.0", + "version": "1.0.1", "description": "Lightweight gallery", "luna": { "icon": true,