-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't import assets on typescript #1514
Comments
|
@mohsen1 I did that, that fixes the problem with types. The thing is that the value of the import is undefined |
TypeScript doesn't know about runtime value. if you're getting runtime value of undefined you're having an issue unrelated to TypeScript |
That's why this is very weird. If I rename the file into .js the import works with exactly the same code. |
Oh! I removed the plugin
I moved this issue to the plugin repo fathyb/parcel-plugin-typescript#42 |
🐛 bug report
When I try to load an asset inside typescript I get undefined instead of the route for the file.
The code above works in normal .js
🎛 Configuration (.babelrc, package.json, cli command)
This is my .babelrc
🤔 Expected Behavior
Import should return the string for the url of the asset.
😯 Current Behavior
I get undefined when trying to import.
💁 Possible Solution
Maybe it can help but it looks like require works as expected
The text was updated successfully, but these errors were encountered: