Description
If bundled, it will not be able to detect which platform the lib is running, which will throw xxx is not supported yet error even for supported platforms like win32 and linux.
This issue has also been reported in #152 and #144 , but I decided to create a new issue with the correct title.
How to reproduce
Just try to bundle it with esbuild, webpack, or whatever.
Possible Solution
Replace the dynamic import below with static ones that bundlers can resolve.
let stat
try {
stat = require('./' + platformToMethod[platform])
} catch (err) {}
API Platform version(s) affected: 3.0.0
Description
If bundled, it will not be able to detect which platform the lib is running, which will throw
xxx is not supported yet
error even for supported platforms like win32 and linux.This issue has also been reported in #152 and #144 , but I decided to create a new issue with the correct title.
How to reproduce
Just try to bundle it with esbuild, webpack, or whatever.
Possible Solution
Replace the dynamic import below with static ones that bundlers can resolve.
Additional Context
PR incoming.