Coder Social home page Coder Social logo

Comments (7)

giu1io avatar giu1io commented on June 11, 2024 1

The issue seems to be with the way Tippy.js is bundled (Tippy is a dependecy of "@tiptap/extension-bubble-menu") Strapi uses esbuild as a bundler, and it seems to think Tippy is an es6 compliant module (it is not).

For the moment i'm using this "fix" in the webpack config file for strapi:

  config.plugins.push(new webpack.NormalModuleReplacementPlugin(
    /^tippy\.js$/,
    'tippy.js/dist/tippy-bundle.umd.min.js'
  ))

However this is not the ideal solution which I think should be:

  • make Tippy.js esModule compliant
  • update the entire dependency tree

I haven't opened an issue on Tippy.js or @tiptap/extension-bubble-menu though.

from strapi-tiptap-editor.

dasmikko avatar dasmikko commented on June 11, 2024 1

The issue seems to be with the way Tippy.js is bundled (Tippy is a dependecy of "@tiptap/extension-bubble-menu") Strapi uses esbuild as a bundler, and it seems to think Tippy is an es6 compliant module (it is not).

For the moment i'm using this "fix" in the webpack config file for strapi:

  config.plugins.push(new webpack.NormalModuleReplacementPlugin(
    /^tippy\.js$/,
    'tippy.js/dist/tippy-bundle.umd.min.js'
  ))

However this is not the ideal solution which I think should be:

  • make Tippy.js esModule compliant
  • update the entire dependency tree

I haven't opened an issue on Tippy.js or @tiptap/extension-bubble-menu though.

I can also confirm that this completely fixes the issue!

I will update the readme to reflect this.

from strapi-tiptap-editor.

fabianmu avatar fabianmu commented on June 11, 2024

In watchmode I get when clicking into the editor to focus on it

TypeError
tippy_js__WEBPACK_IMPORTED_MODULE_2__ is not a function
Call Stack
 BubbleMenuView.createTooltip
  webpack-internal:///9353:661:22
 BubbleMenuView.updateHandler
  webpack-internal:///9353:608:18
 BubbleMenuView.update
  webpack-internal:///9353:683:18
 eval
  webpack-internal:///9353:584:35

from strapi-tiptap-editor.

VercammenJens avatar VercammenJens commented on June 11, 2024

Same issue as #61 I think. @giu1io, how did you debug it to find out that it is Tippy.js? (wondering out of curiousity as I tried to debug it myself aswell)

from strapi-tiptap-editor.

giu1io avatar giu1io commented on June 11, 2024

Same issue as #61 I think. @giu1io, how did you debug it to find out that it is Tippy.js? (wondering out of curiousity as I tried to debug it myself aswell)

I've launched Strapi in --watch-admin mode, that way you can debug the exact point in the code where the crash happens.

from strapi-tiptap-editor.

Sajsaaa avatar Sajsaaa commented on June 11, 2024

@giu1io is there any solution to this editor problem at this moment?

from strapi-tiptap-editor.

giu1io avatar giu1io commented on June 11, 2024

@giu1io is there any solution to this editor problem at this moment?

I'm using the solution that I detailed in my previous comment

from strapi-tiptap-editor.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.