diff --git a/importmap.js b/importmap.js index 457dd32..fe8bd8c 100644 --- a/importmap.js +++ b/importmap.js @@ -23,6 +23,11 @@ const getCurrentScriptData = () => { // 从localStorage获取缓存 const getCachedImportMap = () => { try { + const searchParams = new URLSearchParams(window.location.search); + const noCacheImportMap = searchParams.get('noCacheImportMap'); + if (noCacheImportMap === 'true') { + return null; + } const cacheKey = getCacheKey(); const cached = localStorage.getItem(cacheKey); if (cached) { diff --git a/package.json b/package.json index 2f87463..46f6c90 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@kevisual/native", - "version": "0.0.4", + "version": "0.0.5", "description": "", "main": "index.js", "files": [