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
Hm, interesting. I'll try to find some time to dig into this to see what could be causing it. Babel is configured to parse the file with the typescript parser so I would be surprised if it's causing the issue 🤔
Since some time kit generates a
tsconfig.json
with some defaults and forces us to extend from it (https://github.com/sveltejs/kit/blob/60b3e9e9f489befe64d95afc812b1fcb921563e2/packages/kit/src/core/sync/write_tsconfig.js#L82). This file mainly setswhich means types must be imported with
import type
. The example seems outdated in this regard and just uses a normal value import.While writing queries/mutations/fragments vscode helpfully suggests the correct imports and I end up with something like
After writing the gql string I generate and try to add the type and vscode insists on generating
ESLint is happy but now preprocessing fails with (originating from the
preprocess-esm/index.js
file)The workaround is simple:
but I did this so often I can no longer be bothered with this...
Could this be related to the second parsing phase with babel?
The text was updated successfully, but these errors were encountered: