Skip to content

Type Script usage #5874

Answered by adidahiya
terpimost asked this question in Q&A
Discussion options

You must be logged in to vote

You should not consume the typescript .ts source files of Blueprint published in the NPM package. Those are for source mapping only (in debugging contexts).

You should consume Blueprint (and any other TS-authored library) through its .js and .d.ts files. Blueprint happens to provide .js files in multiple module formats, as you can see in the lib/ folder. Choose the one which is most appropriate for your module loader. For example, recent versions of webpack support ES module syntax, so you should use the lib/esm/ folder. This path is specified by the "module" field in package.json, which webpack uses by convention.

Replies: 5 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by adidahiya
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
2 participants
Converted from issue

This discussion was converted from issue #4175 on January 24, 2023 15:06.