Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

See [https://github.com/ice-lab/icestark/releases](https://github.com/ice-lab/icestark/releases) for what has changed in each version of icestark.

# 2.8.2

- [fix] fix the issue that the UMD library is overwritten by undefined value.

# 2.8.1

- [fix] support unique cache keys for JavaScript resources.
Expand Down
2 changes: 1 addition & 1 deletion packages/icestark/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ice/stark",
"version": "2.8.1",
"version": "2.8.2",
"description": "Icestark is a JavaScript library for multiple projects, Ice workbench solution.",
"scripts": {
"build": "rm -rf lib && tsc",
Expand Down
3 changes: 2 additions & 1 deletion packages/icestark/src/util/handleAssets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,8 @@ export function fetchScripts(jsList: Asset[], fetch: Fetch = defaultFetch): Prom
const globalLib = `window['${library}']`;
const backupLib = `window['__${library}__']`;
const versionedLib = `window['${library}@${version}']`;
return `;${backupLib} = ${globalLib};${text};${versionedLib} = ${globalLib};${globalLib} = ${backupLib};`;
return `;if (${globalLib}) {${backupLib} = ${globalLib};}
${text}; ${versionedLib} = ${globalLib}; if (${backupLib}) {${globalLib} = ${backupLib};${backupLib} = undefined;}`;
}
return text;
})
Expand Down
Loading