Hi,
I am trying to use BulkOperations javascript class inside my custom app.
frappe/frappe/public/js/frappe/list/bulk_operations.js
I tried import it like in list_view.js. I tried it different ways, but i am still getting error.
SyntaxError: Cannot use import statement outside a module
How can i do that? I tried this:
way1
import BulkOperations from "./bulk_operations";
way2
import BulkOperations from "assets/frappe/js/frappe/list/bulk_operations.js";
way3
import BulkOperations from "assets/frappe/js/frappe/list/bulk_operations";
way4
var bulk_operations = undefined;
frappe.require('assets/frappe/js/frappe/list/bulk_operations.js', () => {
bulk_operations = BulkOperations;
});
I understand that there is some basic mistake from my side, but i can’t figure it out. Can you help me?
Thanks