File tree Expand file tree Collapse file tree 1 file changed +1
-4
lines changed Expand file tree Collapse file tree 1 file changed +1
-4
lines changed Original file line number Diff line number Diff line change @@ -27,9 +27,6 @@ function wrapImporter<T>(func: (p: string) => Promise<T>) {
2727
2828 For the browser, we use the function constructor to hide the import calls from
2929 webpack so that webpack doesn't try to compile them away.
30-
31- Browsers automatically cache import() calls, so we add a query parameter with the
32- current time to always invalidate the cache and handle the memoization ourselves
3330 */
3431 return async ( p : string ) : Promise < T > => {
3532 try {
@@ -122,7 +119,7 @@ export const memoizedGetModuleDocsAsync = getMemoizedDocsImporter()
122119
123120const bundleAndTabImporter = wrapImporter < { default : ModuleBundle } > (
124121 typeof window !== 'undefined' && process . env . NODE_ENV !== 'test'
125- ? ( new Function ( 'path' , 'return import(path)' ) as any )
122+ ? ( new Function ( 'path' , 'return import(`${ path}?q=${Date.now()}` )' ) as any )
126123 : // eslint-disable-next-line @typescript-eslint/no-require-imports
127124 p => Promise . resolve ( require ( p ) )
128125)
You can’t perform that action at this time.
0 commit comments