Skip to content

Using parcel to create a bundle for a reusable component #4821

Answered by dharmax
dharmax asked this question in General
Discussion options

You must be logged in to vote

i found a very simple solution:
i added to the file containing the component the line window["MyComponent"] = MyComponent
Then, i ran parcel my-component.ts. The result was a file that externalize the component through a "global" variable.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by dharmax
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant