File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 11// Main entrypoint for ESM web browser environments. Avoids using Node.js
22// specific libraries, such as "path".
33//
4- // TODO: figure out reasonable web equivalents for "resolve", "normalize", etc.
54import { camelCase , decamelize , looksLikeNumber } from './build/lib/string-utils.js'
65import { YargsParser } from './build/lib/yargs-parser.js'
6+ // Using `path-browserify` package from local dependency
7+ import path from './vendor/path-browserify/index.js' ;
8+
79const parser = new YargsParser ( {
810 cwd : ( ) => { return '' } ,
911 format : ( str , arg ) => { return str . replace ( '%s' , arg ) } ,
10- normalize : ( str ) => { return str } ,
11- resolve : ( str ) => { return str } ,
12+ normalize : path . normalize , // Use `path-browserify`
13+ resolve : path . resolve , // Use `path-browserify`
1214 require : ( ) => {
1315 throw Error ( 'loading config from files not currently supported in browser' )
1416 } ,
You can’t perform that action at this time.
0 commit comments