build: rewrite imports from lib to es6 in es6 output #50
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #46
Closes #49
Changes
postbuild
step andtsconfig.es6.json
change from gcanti/fp-ts-rxjs@f35c926io-ts-types
had to be updated. Thees6
folder was added in version 0.5.4.src/remote-data-io.ts
, an import had to be changed to allowimport-path-rewrite
to rewrite it.Testing
I tested this on a fairly large codebase, by rewriting code that used used
Either
and thefp-ts/es6/...
imports to useRemoteData
imported from@devexperts/remote-data-ts/es6/remote-data
, and it worked well.webpack-bundle-analyzer
indicates that onlyes6
parts are bundled, and as far as I can tell only the modules that are in use are included (both fromfp-ts
andremote-data-ts
)I did not test the
remote-data-io
andremote-data-t
parts of the library, as I am not familiar withio-ts
and monad transformers. But I inspected the generated .js and .d.ts in/dist
and/es6
. The output looks correct, and all the imports resolve correctly.Let me know if you have any better ideas for testing this change!