Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(client): split client patch-browser and esm bundle
- Loading branch information
1 parent
dfc1e59
commit 1fe168c
Showing
9 changed files
with
66 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 1 addition & 18 deletions
19
src/client/client-patch.ts → src/client/client-patch-browser.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { BUILD } from '@app-data'; | ||
import { CSS, plt, promiseResolve, win } from '@platform'; | ||
|
||
export const patchEsm = () => { | ||
// NOTE!! This fn cannot use async/await! | ||
// @ts-ignore | ||
if (BUILD.cssVarShim && !(CSS && CSS.supports && CSS.supports('color', 'var(--c)'))) { | ||
// @ts-ignore | ||
return import(/* webpackChunkName: "polyfills-css-shim" */ './polyfills/css-shim.js').then(() => { | ||
if ((plt.$cssShim$ = (win as any).__cssshim)) { | ||
return plt.$cssShim$.i(); | ||
} else { | ||
// for better minification | ||
return 0; | ||
} | ||
}); | ||
} | ||
return promiseResolve(); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters