Skip to content
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

[WASM] Add CommonJS output in rollup #3378

Merged
merged 3 commits into from
Jun 10, 2020
Merged

Conversation

pvaneck
Copy link
Contributor

@pvaneck pvaneck commented Jun 2, 2020

This enables usage of the WASM backend NPM package in Node by outputting a cjs ".node.js" file. The main in package.json will point to this. This follows the pattern of other modules like tfjs-backend-cpu and tfjs-core.

Also did some minor refactoring of common variables.

Note: this rollup config file differs a bit from the ones in other modules, so not sure if intentional or if a consistency update is desired.


This change is Reviewable

This enables usage of the npm package in Node.
@annxingyuan annxingyuan requested a review from tafsiri June 3, 2020 18:26
Copy link
Contributor

@tafsiri tafsiri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For consistency we could also have the es2017 targets for wasm. I think this would be good unless @annxingyuan you see any barriers to that working.

Thanks @pvaneck!

Reviewable status: :shipit: complete! 2 of 1 approvals obtained (waiting on @tafsiri)

@tafsiri tafsiri mentioned this pull request Jun 9, 2020
@annxingyuan annxingyuan merged commit 37849de into tensorflow:master Jun 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants