Closed jackfischer closed 1 year ago
We actually recently merged a change that makes it .query.ts
but have t cut a new release yet. Will do ASAP. In the meantime the --file
option does work.
.query.ts
would suffer the same problem no? It seemed like issue is webpack not recognizing the extension
The problem is that since there is a file named foo.edgeql
and we were generating a foo.edgeql.ts
, when you made an import, webpack (and typescript itself, actually) would try to import the EdgeQL file foo.edgeql
instead of the generated TypeScript file. Renaming the generated file to foo.query.ts
means that importing "foo.query"
will properly see the foo.query.ts
file, unless you also have a file named foo.query
.
See https://github.com/edgedb/edgedb-js/issues/540 for more discussion here.
Fixed in the new release that just went out!
That makes much more sense, thanks.
Describe the bug
Follow up from Discord: When using TS Queries Generator with next.js webpack doesn't know how to process the
.edgeql.ts
files. @1st1 said it should generate_edgeql.ts
files instead.Reproduction Run
@edgedb/generate queries
, import the resulting TS files in next.js.Versions (please complete the following information): @edgedb/generate 0.1.1