babichjacob / sapper-typescript-graphql-template

A template that includes Sapper for Svelte, TypeScript preprocessing, and a GraphQL server through TypeGraphQL
MIT License
84 stars 14 forks source link

Upgrade Sapper and update issue link #7

Closed benmccann closed 4 years ago

babichjacob commented 4 years ago

The workaround is still necessary for me on Sapper >= 0.27.15.

For example, try passing

{
    files: ["not-exist.ts"],
}

as options to typescript(/* here */). You get the opaque error

@rollup/plugin-typescript: Couldn't process compiler options

without the explanatory warning

(typescript plugin) @rollup/plugin-typescript TS5023: Unknown compiler option 'files'.
benmccann commented 4 years ago

Gahhh!!!!! :sob: I really thought I had them all fixed

benmccann commented 4 years ago

Actually, I just tested this and the error showed up for me:

cross-env NODE_ENV=production sapper build --legacy

Building... @rollup/plugin-typescript TS5023: Unknown compiler option 'files'.

[!] (plugin typescript) Error: @rollup/plugin-typescript: Couldn't process compiler options Error: @rollup/plugin-typescript: Couldn't process compiler options

Maybe the issue is just that it printed multiple errors and you missed the explanation above the last error? I'm not sure what Rollup would do here, but if we can make the output closer I guess that we could make an enhancement request to Sapper

babichjacob commented 4 years ago

Oh, so it works during prod but not dev

benmccann commented 4 years ago

Ohh. Yeah, I was testing with npm run build

I filed an issue and updated this PR to use the new issue link. It's probably still worth upgrading Sapper here since it fixes three other issues with swallowing errors. Too bad there's a fourth :stuck_out_tongue: