File tree Expand file tree Collapse file tree 2 files changed +10
-8
lines changed
Expand file tree Collapse file tree 2 files changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -45,10 +45,6 @@ const config: StorybookConfig = {
4545 config . resolve . fallback [ 'http' ] = false ;
4646 config . resolve . fallback [ 'https' ] = false ;
4747 config . resolve . fallback [ 'os' ] = false ;
48- // Provide browser polyfill for 'path' (used indirectly by clean-css)
49- config . resolve . fallback [ 'path' ] = require . resolve ( 'path-browserify' ) ;
50- // Explicitly disable 'fs' since clean-css conditionally touches it; we don't need it in the browser
51- config . resolve . fallback [ 'fs' ] = false ;
5248
5349 // Required as otherwise 'process' will not be defined when included on its own (without .env)
5450 // e.g process?.env?.SOME_VAR
Original file line number Diff line number Diff line change 11const runtimeHostname = ( ) => {
2- if ( typeof process !== 'undefined' && process . env . HOSTNAME )
3- return process . env . HOSTNAME ;
4- if ( typeof window !== 'undefined' ) return window . location . hostname ;
5- return 'localhost' ;
2+ try {
3+ if ( typeof process !== 'undefined' && process . env . HOSTNAME ) {
4+ return process . env . HOSTNAME ;
5+ }
6+ } catch {
7+ /* ignore */
8+ }
9+ if ( typeof window !== 'undefined' && window . location . hostname ) {
10+ return window . location . hostname ;
11+ }
612} ;
713
814const FORCE_BRAZE_ALLOWLIST = [
You can’t perform that action at this time.
0 commit comments