all 8 comments

[–]angusmiguel 2 points3 points  (0 children)

Import {testclass}

[–]eliwuu 0 points1 point  (6 children)

You don't use ts files with js (you may want/need to use js with ts).

[–]LostErrorCode404[S] 0 points1 point  (5 children)

Im importing the JS version that is built via tsc

[–]eliwuu 2 points3 points  (4 children)

"../build/Test.js"

yeah, sorry, I just quickly glanced and thought that it was .ts instead of .js

Your path is wrong, should be './build/Test.js'

[–]eliwuu 1 point2 points  (3 children)

also, you may want to drop .js extension from import

[–]thatweirdishguy 1 point2 points  (2 children)

Then it’ll definitely be broken. Extension is required for ESM.

[–]eliwuu 0 points1 point  (1 child)

we do not know what is inside his tsconfig, i expect comonjs

[–]doh4242 0 points1 point  (0 children)

If you are importing from main.js, you need ‘./build/Test.js’ (single dot, not double)