javascript – Import line has to export in WordPress plugin

Question

I just learned import/export for JS today but I saw this plugin

And it uses something like,

import { modal, configure } from 'web3-login';

What does web3-login mean? It is a shorthand? What I learned is ‘./web3-login.js’

And also, I can’t an export anywhere in the code. I thought we should have like,

export function modal()

How come? There’re no traces of web3-login text in a function or export line in the entire plugin.

People are saying it’s using node or npm package but ain’t possible with WordPress.

0
ratib90486 5 months 2022-07-12T08:41:08-05:00 0 Answers 0 views 0

Leave an answer

Browse
Browse