Open jasonkuhrt opened 4 years ago
Many questions:
So am I understanding you correctly, that rollup does aggressive treeshaking on fs-jetpack and the library doesn't work after that?
I assume it happens only when you use es6 modules?
Is the problem only with inspect
or with all the methods?
Generally speaking sure I'd welcome a PR to fix it :) But I'd also like to know more about the issue.
Ah, I mistakenly thought this project was written in TypeScript, only now realizing it is just the spec modules.
Rollup has trouble with this module
"use strict";
const jetpack = require("./lib/jetpack");
module.exports = jetpack();
Is the problem only with inspect or with all the methods?
All
I assume it happens only when you use es6 modules?
Yeah, we are working with TypeScript with ES modules enabled.
and the library doesn't work after that?
Rollup is unable to tree shake fs-jetpack in the first place.
But I'd also like to know more about the issue.
Will share more info as we get it ourselves 👍
We're currently working on tree-shaking Nexus builds. We're trying rollup and webpack. With rollup we've been hitting some issues with fs-jetpack, such as:
We're still investigating but it would be great if
fs-jetpack
had ESM builds.Would you be open to a PR for this?
It should just be a matter of something like this https://github.com/graphql-nexus/nexus/commit/0955d73557aaf12c507e9734684b8c739f0582a9, where there are two tsc build steps.