File tree Expand file tree Collapse file tree 2 files changed +11
-5
lines changed
Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -147,7 +147,7 @@ const moduleRunnerConfig = defineConfig({
147147 '@vitejs/devtools/cli-commands' ,
148148 ...Object . keys ( pkg . dependencies ) ,
149149 ] ,
150- plugins : [ bundleSizeLimit ( 54 ) , enableSourceMapsInWatchModePlugin ( ) ] ,
150+ plugins : [ bundleSizeLimit ( 55 ) , enableSourceMapsInWatchModePlugin ( ) ] ,
151151 output : {
152152 ...sharedNodeOptions . output ,
153153 minify : {
Original file line number Diff line number Diff line change 11import * as pathe from 'pathe'
22import { isWindows } from '../shared/utils'
33
4- export const decodeBase64 : typeof atob =
5- typeof atob !== 'undefined'
6- ? atob
7- : ( str : string ) => Buffer . from ( str , 'base64' ) . toString ( 'utf-8' )
4+ const textDecoder = new TextDecoder ( )
5+
6+ export const decodeBase64 : ( base64 : string ) => string = ( ( ) => {
7+ if ( typeof Buffer === 'function' && typeof Buffer . from === 'function' ) {
8+ return ( base64 : string ) => Buffer . from ( base64 , 'base64' ) . toString ( 'utf-8' )
9+ }
10+
11+ return ( base64 : string ) =>
12+ textDecoder . decode ( Uint8Array . from ( atob ( base64 ) , ( c ) => c . charCodeAt ( 0 ) ) )
13+ } ) ( )
814
915const CHAR_FORWARD_SLASH = 47
1016const CHAR_BACKWARD_SLASH = 92
You can’t perform that action at this time.
0 commit comments