Problem on upgrade an add on for javascript image editor

Hi, i have an addon for pixie image editor.

i’m upgrading the version of the editor and i’m not able to make it run.

The treviews version was a normal javascript, now i have 2 files and pixie.umd.js

I tried importing them in this way :

Not sure if react is necessary, but i think is.

@NpmPackage(value = “react”, version = “18.2.0”)
@NpmPackage(value = “react-dom”, version = “18.2.0”)
public class PixieImageEditor extends Component implements HasSize, HasStyle {…

In the pixieConnector file i instantiate the editore like this.

        var pixie = new Pixie({
            selector: "#" +,
            baseUrl: newBaseUrl,
            ui: {...........

at this point i get an error “Can’t find variable: Pixie”
Seems that the files are properly loaded into the browser, but the class Pixie is not found !

any Hint ?


Did you import the class Pixie in your JavaScript file?

Hi Christophe, yes, the class is present into the file.

at the end of the file . read

let Gn = ul;
Se(Gn, “defaultConfig”, Hf), Se(Gn, “version”, yy);
export {
Gn as Pixie

here the info on how to get started.

there are two wais to use it, in Vanilla JS mode and in React JS

You need to import it in your JavaScript file

You mean in pixieConnector ?


Like here ( as an example) sortable-layout/sortable-layout/src/main/resources/META-INF/resources/frontend/sortableConnector.js at master · jcgueriaud1/sortable-layout · GitHub

Hi, thanks for the sample code.

Hi @faithful-emu , solved including the JS in this way.

import {Pixie} from ‘./’;

Thanks again