From 9ac6225f3ccc3bb723c803c460d17ca67620fef1 Mon Sep 17 00:00:00 2001 From: * <8> Date: Tue, 3 Jan 2023 17:57:34 +0800 Subject: [PATCH 1/2] Match-id-8ef71c7cfe07396edb4a3bc4819b13211abff46f --- CHANGELOG.md | 3 +++ libs/horizon/package.json | 2 +- scripts/rollup/rollup.config.js | 8 ++++++-- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b1b9cfbc..74cdf1c1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +## 0.0.29 (2023-01-03) +- **CI**: 生成态输出文件改为horiozn.producion.min.js + ## 0.0.26 (2022-11-09) - **CI**: 包信息同步CMC diff --git a/libs/horizon/package.json b/libs/horizon/package.json index 0658232f..6960612e 100644 --- a/libs/horizon/package.json +++ b/libs/horizon/package.json @@ -4,7 +4,7 @@ "keywords": [ "horizon" ], - "version": "0.0.26", + "version": "0.0.29", "homepage": "", "bugs": "", "main": "index.js", diff --git a/scripts/rollup/rollup.config.js b/scripts/rollup/rollup.config.js index efe2aabd..05bd691e 100644 --- a/scripts/rollup/rollup.config.js +++ b/scripts/rollup/rollup.config.js @@ -38,6 +38,10 @@ if (!fs.existsSync(outDir)) { const outputResolve = (...p) => path.resolve(outDir, ...p); +function getOutputName(mode) { + return mode === 'production' ? `horizon.${mode}.min.js` : `horizon.${mode}.js`; +} + function genConfig(mode) { const isDev = mode === 'development'; const sourcemap = isDev ? 'inline' : false; @@ -45,12 +49,12 @@ function genConfig(mode) { input: path.resolve(libDir, 'index.ts'), output: [ { - file: outputResolve('cjs', `horizon.${mode}.js`), + file: outputResolve('cjs', getOutputName(mode)), sourcemap, format: 'cjs', }, { - file: outputResolve('umd', `horizon.${mode}.js`), + file: outputResolve('umd', getOutputName(mode)), sourcemap, name: 'Horizon', format: 'umd', From 69ebc90fc06af27353a45790c22f23749d6e4163 Mon Sep 17 00:00:00 2001 From: * <8> Date: Tue, 3 Jan 2023 20:13:42 +0800 Subject: [PATCH 2/2] Match-id-73ed656be14649c6992f6d3c2786429fa30c531f --- CHANGELOG.md | 2 +- libs/horizon/package.json | 2 +- libs/horizon/src/horizonx/devtools/index.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 74cdf1c1..77f50501 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -## 0.0.29 (2023-01-03) +## 0.0.30 (2023-01-03) - **CI**: 生成态输出文件改为horiozn.producion.min.js ## 0.0.26 (2022-11-09) diff --git a/libs/horizon/package.json b/libs/horizon/package.json index 6960612e..f55ef7f3 100644 --- a/libs/horizon/package.json +++ b/libs/horizon/package.json @@ -4,7 +4,7 @@ "keywords": [ "horizon" ], - "version": "0.0.29", + "version": "0.0.30", "homepage": "", "bugs": "", "main": "index.js", diff --git a/libs/horizon/src/horizonx/devtools/index.ts b/libs/horizon/src/horizonx/devtools/index.ts index e7f3514e..f49deaaa 100644 --- a/libs/horizon/src/horizonx/devtools/index.ts +++ b/libs/horizon/src/horizonx/devtools/index.ts @@ -108,7 +108,7 @@ window.addEventListener('message', messageEvent => { } // executes store action - if (messageEvent.data.payload.type === 'horizonx executue action') { + if (messageEvent.data?.payload?.type === 'horizonx executue action') { const data = messageEvent.data.payload.data; const store = getStore(data.storeId); if (!store?.[data.action]) return;