Skip to content

How to add .js files to built bundle? #936

Answered by agilgur5
xpertana asked this question in Q&A
Discussion options

You must be logged in to vote

It's hard to tell what the issue is without a repro or seeing the built output.

TSDX does support JS and I personally put in several PRs for this and there are tests for it too.

import { IStep } from "../engage_protobuf.js"

I suspect the issue may be that in TS one does not use file extensions, so your import maybe isn't getting recognized as result. I would remove the .js from your import and make sure you've set allowJs to true in your tsconfig.json

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@xpertana
Comment options

@agilgur5
Comment options

Answer selected by xpertana
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants