Comments (10)
Not again :(
But after a search, i found it : http://stackoverflow.com/questions/20534702/node-js-use-of-module-exports-as-a-constructor
Since you can attach a function directly to module.exports you can essentially return a function and like any function it could be managed as a constructor
So i tried to modifiy your dist file by adding (at the very end) :
module.exports = o;window.Tippy=o
AND IT WORKS.
So, in your source code, i think you have to write this :
(in src/js/tippy.js, at the very end of the file)
module.exports = Tippy
window.Tippy = Tippy
Add the module.exports line, compile and submit a v0.5.0 :)
Regards,
from tippyjs.
I have the same error :
My directive file :
import Tippy from 'tippy'
window.Tippy = Tippy
TypeError: _tippy2.default is not a constructor
from tippyjs.
I'm switching to Rollup for bundle generation for v0.4.0 so it might solve the issue...
from tippyjs.
Thanks !
So I'll wait for v0.4.0 👍
from tippyjs.
v0.4.0 is out now... give it a try
from tippyjs.
Not :(
Always the same error...
import Tippy from 'tippy.js'
always returns _tippy2.default is not a constructor
from tippyjs.
Maybe try import { Tippy } from 'tippy.js'
?
from tippyjs.
I had that in v0.3.5, but with Rollup it broke when using the browser version so I removed it, lol
The browser version works too if I do export default class Tippy { ...
I solved it... need to export it from the main.js
Rollup entry file, I believe
from tippyjs.
v0.4.1 should work now, can you test it out?
from tippyjs.
It works now :)
Thanks for your work !
from tippyjs.
Related Issues (20)
- Building with vite does not remove "This is a development-only message." message
- Wrong initial animation not working in Angular production mode
- Nested tippies HOT 1
- tippy doesnt load sometimes
- Uncaught TypeError: Cannot read properties of null (reading 'body')
- popups appearing outside viewport on iPad HOT 1
- Is there a reason to reset state.attributes.popper?
- dblclick
- It's undocumented whether tippies should be destroyed when no longer needed
- Issue with Custom SVG Arrow Rendering on Top of Tippy.js Tooltip HOT 1
- Nesting
- Use interactive tooltips in svg context
- Content in Tippy js doesn't react on clicks and another
- ERROR ReferenceError: document is not defined
- Show tippy on selected text of other webpages
- spurious hide() after destroy() related to addDocumentPress() without matching removeDocumentPress()
- data-reference-hidden not working correctly on animation
- Allow `onClickOutside` to conditionally not hide the tippy
- No tooltips are shown (since new were added) HOT 1
- Painless use: Just pull content from the title attribute HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tippyjs.