Closed liammclennan closed 1 year ago
Hi, thanks for moving on with this topic! I came across an issue that webpack is still trying to resolve the three required polyfills for the older nodejs versions. While it does work, and I can add to webpack configs to ignore those requires, I think it is only half achieving the goal. Do you think we can still do some iterations to see if it can be achieved without the need to configure webpack for it?
Hi @u-rogel
That looks like how Webpack have chosen to deal with optionally required modules. I'd love a better solution. What do you propose?
It is some time since I tried it but I remember webpack had an option for conditional compiling plugin. If it is still available we can create two bundles, one for node one for browser. Then we need to specify that the module is exporting two bundles one for node and one default (browser) and then webpack or rollup will pick up automatically the right bundle.
Can you also give it a try if you find this webpack plugin for conditional compile time?
@u-rogel I'm happy to help, but I don't understand what you mean. seq-logging
doesn't use webpack so where would the config go?
I think we would need to introduce webpack or rollup in order to achieve it
Makes
seq-logging
work in the browser without having to polyfill node modules.Drops support for node 12 and therefore bumps the version of this package to 2.0.0.