-
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
not support [email protected] #59
Comments
Exactly. This is happening. When I made the |
You can use Because ex. {
"scripts": {
"build": "parcel build src/index.ts --target node"
}
} to {
"scripts": {
"build": "tsc - no Emit && parcel build src/index.ts --target node"
}
} |
Yeah, it seems TypeScript files aren't being processed by tsc.
Versions: |
I'm having the same issue |
As far as I know, absolute imports are not working with |
This is a really bad bug. First noticed it while learning Parcel on codesandbox, attributed it to the platform, started a new project locally and I'm still having issues compiling typescript files. Any typescript-specific syntax breaks the compiler. Both .ts and .tsx file extensions break parcel. |
Any updates? I have the same issue: "parcel-bundler": "^1.10.3",
"parcel-plugin-typescript": "^1.0.0" |
I solved this issue by abandoning this plugin and instead installing
|
@mitchellnemitz this "works" but still doesn't report errors on build. Edit: unless I am missing something, which could very well be the case :) |
same issue? |
@benpolinsky if you add |
@mitchellnemitz Thanks for explaining the thinking behind the decision. From my perspective, it'd be great to have as part of Parcel's zero-config philosophy since it's pretty crucial to TypeScript. JSLint isn't essential to JS, but type checking is pretty essential to TypeScript - that's my line of thought anyhow. |
@benpolinsky Hrm, I actually agree. I'm just so used to solving my problems by piling on tooling and configuration that I almost forget what Parcel is supposed to be. I'm going to take a pass at creating a Typescript plugin that compiles via Babel but runs type checking with |
For what it's worth, you could just go with my approach combined in an npm script like so until I get an alternative plugin together: #59 (comment) |
Here's what I cobbled together the other day, seemed to work okay. Just building off the included TS Asset: https://gist.github.com/benpolinsky/a968b18b82ae2805f742e3cc04cf9417 Basically using the examples from the TypeScript compiler API to list diagnostics but not emit the TypeScript. Then let parcel + Babel do their thing. |
My project was fine with webpack, can anyone advise how to fix parcel here: https://github.com/QuantumInformation/youtube-space-invaders/tree/b |
@quantuminformation can you be more specific as to what error you're experiencing? Is it that your Typescript isn't compiling with this plugin? If so, try one of the solutions above involving Babel 7.x and tsc in an npm script. If it's something else, you should open an issue in the relevant repository. |
If you're using Typescript, you're beyond the zero-config functionality of Parcel. It has out of the box support for JS / CSS / HTML and a few other things, but not TS. Set up Typescript through Babel and create an npm script as suggested above and you'll be off to the races again. |
dang, might go back to webpack. |
@mitchellnemitz what do I put in place of |
See Module Resolution documentation for more details: https://www.typescriptlang.org/docs/handbook/module-resolution.html#path-mapping Most people won't need the |
Forgot `.babelrc` from fathyb/parcel-plugin-typescript#59 (comment)
I understand the reasoning behind this to implement type checking before building and making sure code is not emitted if there are errors.
But I don't quite understand the need for this, especially when paired with this:
Which is not quite true!? I mean, Parcel has [partial] support for TypeScript out of the box, it just doesn't do type checking. But we can work around that issue with So, what are the real advantages of moving to Babel instead of TypeScript for compilation besides "speed"? |
Throw error when update parcel to 1.10.
Look like typescript compile failure.
Maybe because [email protected] support babel@7, I don't know ..
The text was updated successfully, but these errors were encountered: