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
import logo from '../img/intro.png';
then <img src={logo} alt="image"/>;
Expected Behavior
Having just a picture showing on my app
Actual Behavior
(!) Plugin typescript: @rollup/plugin-typescript TS2307: Cannot find module '../img/intro.png' or its corresponding type declarations.
src/pages/popup/App.tsx: (2:18)
2 import logo from '../img/intro.png';
~~~~~~~~~~~~~~~~~~
[!] Error: Unexpected character '�' (Note that you need plugins to import files that are not JavaScript)
src/pages/img/intro.png (1:0)
Additional Information
I read rollup doc, I checked stackoverflow, Im just lost I have no Idea why its not working I used to import picture / component like this, I didnt find anything and im sure its pretty simple, I will be glad is someone would just guid me
This discussion was converted from issue #1273 on September 25, 2022 21:57.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I used this repo for my app : (so its to make a chrome extension)
https://github.com/rossmoody/ts-extension-starter?ref=reactjsexample.com
I added just one line on App.tsx
import logo from '../img/intro.png';
then
<img src={logo} alt="image"/>;
Expected Behavior
Having just a picture showing on my app
Actual Behavior
Additional Information
I read rollup doc, I checked stackoverflow, Im just lost I have no Idea why its not working I used to import picture / component like this, I didnt find anything and im sure its pretty simple, I will be glad is someone would just guid me
Beta Was this translation helpful? Give feedback.
All reactions