nicolasdao / schemaglue

Naturally breaks down your monolithic graphql schema into bits and pieces and then glue them back together.
BSD 3-Clause "New" or "Revised" License
116 stars 13 forks source link

can not import ts module into js module #7

Closed mrdulin closed 6 years ago

mrdulin commented 6 years ago

I use webpack and awesome-typescript-loader and want to import ts module into a js file.

when I build my source code, it throw error.

here is the repo for reproducing this issue.

https://github.com/mrdulin/schemaglue-js-import-ts-issue

I think I know what happened. Because schemaglue use its fs operation, not use webpack fs oepration. So import ts module into js file will not pass webpack loaders and plugins.

nicolasdao commented 6 years ago

Hi @mrdulin ,

What if you add this to your webpack config:

node: {
   fs: "empty"
}

https://github.com/webpack-contrib/css-loader/issues/447

nicolasdao commented 6 years ago

Support for typescript added for version >= 4.0.0. Closing this issue now.