You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
agilgur5
changed the title
[React/Storybook] [example app] support for example project + embedded assets
support for assets in Parcel example app
Mar 19, 2021
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
The text was updated successfully, but these errors were encountered: