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.
@spences10 If you happen to speak to Chris again i think this is what we'll need but i've gotta be honest i've run out talent with Babel.
Before this PR i was transforming syntax to
cjs
, and now i've removed@babel/plugin-transform-modules-commonjs
and set@babel/preset-env
to"modules": false
which i think now will export just the ES syntax.If you give this a pull and run
yarn build
and have a look at thedist
folder the exported code looks much more like the kinda thing we'd write.Also made a small change to
tsconfig
as i was exporting the types to atypes
dir but wasn't point thedeclarationDir
at that dir so we would have proabably had a "types not found" error if we'd tried to use the package in a TypeScirpt project.