When I use that from another js file with ``` impo...
# javascript
p
When I use that from another js file with
Copy code
import { test } from './test'
then I got an error.
Copy code
Uncaught TypeError: Cannot read property 'test' of undefined
It is not occurred when I didn't use sealed class. Is this problem because of my code?
r
Actually I am not sure that using named import is working well with commonjs module.
p
when I didn't use sealed class, importing commonjs module as esmodules works correct.
I'll try with gradle. Thank you for your replying.
I found my mistake. I needed to put the compiled js file into the node_modules directory.
👍 1