In a tsdx react/storybook project, you may want to add fonts or images with your components. With the proper loader as explained here, you can easily include your assets. For fonts, you can "tree shake" the inclusion with imports, like import RegularFont from 'regularFont.ttf', build along a @font-face css block with url(${regularFont}) and it will compile nicely.
The problem is that the example app works with parcel and so assets aren't shipped.
I expect this will be a similar issue with npm link workflow for working in tandem with other projects.
Expected behavior
Static assets should be loaded as well im example app.
Suggested solution(s)
Not sure.
Additional context
I reckon is this side effect of tsdx and not really a direct issue of the package, but... yeah. I think a lot of people would definitely be interested in an answer/solution.
Current Behavior
In a tsdx react/storybook project, you may want to add fonts or images with your components. With the proper loader as explained here, you can easily include your assets. For fonts, you can "tree shake" the inclusion with imports, like
import RegularFont from 'regularFont.ttf'
, build along a @font-face css block withurl(${regularFont})
and it will compile nicely.The problem is that the example app works with parcel and so assets aren't shipped. I expect this will be a similar issue with
npm link
workflow for working in tandem with other projects.Expected behavior
Static assets should be loaded as well im example app.
Suggested solution(s)
Not sure.
Additional context
I reckon is this side effect of tsdx and not really a direct issue of the package, but... yeah. I think a lot of people would definitely be interested in an answer/solution.
Your environment