Closed azdurov closed 1 year ago
@azdurov, have you seen mergely-webpack? It is a good starting point on how to start working with Mergely. You're using import
too, so I am a bit puzzled.
@wickedest , thanks for the example. I have seen this before and it works. The fact is that my js script is used as a module. Because of this, I have already encountered several problems with the initialization of various npm dependencies. And now, a simple import from Mergely executes the code inside, but does not register the method in the jQuery.
@azdurov, what are you trying to do exactly? Mergely is jquery plugin that needs to be bundled together with jquery and codemirror, and also requires a browser to work.
@wickedest, when using a js script as a module, the jQuery is not added to the global "window". Therefore, Mergely does not see it. And I wanted to be able to specifically pass the jQuery inside, to initialize the "mergely" method.
The changes in the "webpack-upgrade" branch are fine for me. And I wanted to see it as an npm library.
@azdurov, try again with the latest mergely (v5).
@wickedest , thanks a lot for the new release! Problem solved.
"mergely": "^5.1.1" $(...).mergely() is not a function
Hello. There are problems with importing the Mergely My js file is used as a module:
<script type="module" src="/assets/diff.js"></script>
diff.js file content:
Apparently method
pluginMaker
doesn't add methodmergely
tojquery
.As I see, there is an actual pull request with a large number of changes. And maybe the changes will help in my case. https://github.com/wickedest/Mergely/pull/171 When will the pull request be completed?