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
not sure if this a (documentation?) bug or if I'm doing something really stupid, but in a minimal new project, all requests to my TypeScript entry-point simply fail with 404 errors.
After a lot of messing around with snowpack dev, I found out that simply requesting the file as index.jsdoes work (requests by curl for easier copy&pasting, behaves the same in the browser):
$ curl --verbose localhost:8080/index.ts
[...]
< HTTP/1.1 404 Not Found
$ curl --verbose localhost:8080/index.js
[...]
< HTTP/1.1 200 OK
The docs simply state that "Snowpack includes built-in support to build TypeScript files (*.ts) to JavaScript." and don't mention any such requirement (that causes warnings in the IDE, as there usually is no corresponding *.js on the disk at that location).
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
-
Hi there,
not sure if this a (documentation?) bug or if I'm doing something really stupid, but in a minimal new project, all requests to my TypeScript entry-point simply fail with 404 errors.
package.json:
index.html:
index.ts
After a lot of messing around with
snowpack dev
, I found out that simply requesting the file asindex.js
does work (requests by curl for easier copy&pasting, behaves the same in the browser):The docs simply state that "Snowpack includes built-in support to build TypeScript files (*.ts) to JavaScript." and don't mention any such requirement (that causes warnings in the IDE, as there usually is no corresponding
*.js
on the disk at that location).Is this working as intended?
Beta Was this translation helpful? Give feedback.
All reactions