-
-
Notifications
You must be signed in to change notification settings - Fork 210
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fitty_module is not a function #61
Comments
what if you do |
Same result. |
I made it work like this with Rollup import fitty from 'fitty';
window.fitty = fitty.default;
// Do your thing
fitty('.my-element'); I don't 100% understand all the various ways to import and export modules, but from my understainding the default export seems to be an object and within the |
That resulted in the same error for me, but did prompt me to try the below, which seems to work. 👍 import fitty from 'fitty';
fitty.default('.my-element'); |
Okay, nice, happy to make adjustments to the package.json to get this working, but not sure why this happens. Will leave the issue open for any suggestions. |
@rikschennink From a quick observation, it seems like it might be due to an older version of Babel? I tried transpiling the source using Babel v7.11.0 and the resulting file is different. In this case fitty gets assigned to a global I haven't had the time to test this thoroughly, but I think it's a good lead. |
@PaulMorel thanks, will look into it when I have some free time |
Just tested with codesandbox but seems to work fine: |
Hi
I'm getting
TypeError: fitty_module is not a function
when using Fitty with Rollup.I'm doing this:
My Rollup config is essentially this.
What am I doing wrong?
The text was updated successfully, but these errors were encountered: