-
-
Notifications
You must be signed in to change notification settings - Fork 503
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Include sources in package? #223
Comments
Sure. Could you please help me on this? What should I do, just - "files": ["lib"],
+ "files": ["lib", "src"], in package.json? |
Could we solve the Basically, I think most people just want to write "fp-ts/module" instead of "fp-ts/lib/module". This was already mentioned in an issue somewhere, forgot where. If I remember, I'll have a tinker with it tonight. As for the sources, you need to generate mappings, etc, I'll have a look at that too. |
Will adding sources affect IDE/editor autocompletion in any way? Especially with duplicates in |
It shouldn't, when properly done |
I'm hitting the source-map-loader issue as well which prevents me from using this wonderful library WARNING in ../~/fp-ts/lib/Option.js |
@boaz-chen do you know what's the fix? |
Ok, I found a working workaround follwing apollographql/react-apollo#597 which makes the warnings go away. @gcanti I don't know what the fix is unfortunately. |
I'm happy to jump in here and fix this, I just need a bit of direction on a few points: Publish source or remove sourcemaps?Just double-checking: we do want to publish the source to the registry? Pros
Cons
FWIW, most TypeScript libraries do not publish the source, just the definitions files, since the source files are potentially not valid depending on the version of TypeScript compiler you're using. If we wanted to go this route, we would just need to turn off Module import patternThere is a mention of the Basically, I'm suggesting we support both of these import statements for backwards-compatibility: import Foo from 'fp-ts/lib/Foo'; and import { Foo } from 'fp-ts'; |
Thanks for pointing out. So, let's do not generate the |
Hey, how about including the sources in the npm package? this could be useful for debugging.
Also, I'm using webpack with source-map-loader with a setup that expects source maps to be valid, and they fail in this case since the paths indicated in the source map is absent.
The text was updated successfully, but these errors were encountered: