Closed swaff closed 2 years ago
Thanks @swaff!
At a glance this makes sense to me. I'll spend some time this week to test and confirm.
Hi @johnagan, thanks for your time on this.
With some help at work I have actually been able to get my setup working by importing webflow from the dist
dir.
import Webflow from 'webflow-api/dist/Webflow';
The CommonJS/EMS area is quite precarious so I think it might be best to discard my proposed change. I would not want to cause issues for any other consumers of the library by changing the interface.
I will leave it to you to decide because you may well be more knowledgable about this area than me, but feel free to close without merging.
Thanks again.
Using a test setup written in vitest the webflow-api module cannot be imported because the package.json sets the jsnext:main value to point to src/index.js which in turn exports code using common js.
Therefore this change uses import/export. The tests still pass and the output to the dist directory remains the same.