You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I may be missing something obvious, but when I use istextorbinary and build for the browser, I get the following error:
> node_modules/istextorbinary/edition-browsers/index.js:2:26: error: Could not resolve "path" (use "platform: 'node'" when building for node)
2 │ import * as pathUtil from 'path';
╵ ~~~~~~
And here's what happens if you try to build it with esbuild --bundle:
$ esbuild test.ts --outfile=test.js --bundle
> node_modules/istextorbinary/edition-browsers/index.js:2:26: error: Could not resolve "path" (use "--platform=node" when building for node)
2 │ import * as pathUtil from 'path';
╵ ~~~~~~
The text was updated successfully, but these errors were encountered:
I may be missing something obvious, but when I use istextorbinary and build for the browser, I get the following error:
Should it be importing from
path
?Here's an example file
test.ts
:And here's what happens if you try to build it with
esbuild --bundle
:The text was updated successfully, but these errors were encountered: