ionic-team / rollup-plugin-node-polyfills

MIT License
139 stars 59 forks source link

url polyfill is missing pathToFileURL() #12

Open habdelra opened 4 years ago

habdelra commented 4 years ago

The url polyfill is missing the pathToFileURL() function, as documented here: https://nodejs.org/api/url.html#url_url_pathtofileurl_path

heypran commented 2 years ago

how can I solve the issue on my end, is there a work around. The below is the line, to creating the issue in my main build index.js when I am trying to use my package const baseUrl = URL.pathToFileURL(process.cwd() + '/');

heypran commented 2 years ago

I tried rollup node resolve, made url:true and installed a local url package.. still getting the same issue.

TypeError: URL.pathToFileURL is not a function

This error happened while generating the page. Any console logs will be displayed in the terminal window.

I am using the package in a nextjs app