-
Notifications
You must be signed in to change notification settings - Fork 18
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
parcel-plugin-typescript breaks asset file imports #42
Comments
What's the contents of your |
Like this {
"compilerOptions": {
"strict": true,
"alwaysStrict": true,
"module": "commonjs",
"moduleResolution": "node",
"types": ["node", "jest", "pixi.js"],
"newLine": "LF",
"outDir": "lib",
"jsx": "preserve",
"target": "es2017",
"lib": [
"es2017",
"dom"
],
"noUnusedLocals": true,
"noUnusedParameters": true,
"noImplicitAny": true,
"noFallthroughCasesInSwitch": true,
"experimentalDecorators": true,
"baseUrl": "./src",
"paths": {
"@common/*": ["./common/*"],
"@client/*": ["./client/*"],
"@server/*": ["./server/*"]
}
},
"include": [
"src/common/**/*.ts",
"src/client/**/*.ts"
],
"exclude": [
".git",
"node_modules"
]
} |
The workaround of using
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
🐛 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
🤔 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: