apollo-link-persisted-queries icon indicating copy to clipboard operation
apollo-link-persisted-queries copied to clipboard

Don't mix require with import statements, it breaks rollup bundling

Open leonbe02 opened this issue 5 years ago • 4 comments

Can you adjust this to not use CommonJS require mixed with ES6 imports? It is breaking rollup bundles since they can't handle files that use both.

https://github.com/apollographql/apollo-link-persisted-queries/blob/974edc3981570005d18ea455cc048f2a335c3b1b/src/index.ts#L2

leonbe02 avatar Dec 20 '19 01:12 leonbe02

bump

leonbe02 avatar Jan 10 '20 23:01 leonbe02

bump

leonbe02 avatar Mar 12 '20 23:03 leonbe02

This is probably the reason, I'm getting following warning:

WARNING in /opt/app/projects/website/src/app/providers/apollo.provider.ts depends on 'apollo-link-persisted-queries'. CommonJS or AMD dependencies can cause optimization bailouts.

Kindly fix it!

sahilpurav avatar Jul 30 '20 15:07 sahilpurav

@benjamn could you take a look at https://github.com/apollographql/apollo-link-persisted-queries/pull/59 to fix this?

mattvb91 avatar Oct 12 '20 11:10 mattvb91