Match-id-f33f05f9e3da93aae011aa3682b0f1a457c62ea1
This commit is contained in:
commit
036bf359c3
|
@ -1,3 +1,6 @@
|
|||
## 0.0.30 (2023-01-03)
|
||||
- **CI**: 生成态输出文件改为horiozn.producion.min.js
|
||||
|
||||
## 0.0.26 (2022-11-09)
|
||||
- **CI**: 包信息同步CMC
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
"keywords": [
|
||||
"horizon"
|
||||
],
|
||||
"version": "0.0.26",
|
||||
"version": "0.0.30",
|
||||
"homepage": "",
|
||||
"bugs": "",
|
||||
"main": "index.js",
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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',
|
||||
|
|
Loading…
Reference in New Issue