-
-
Notifications
You must be signed in to change notification settings - Fork 55
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
Improve build system #35
Conversation
package.json
Outdated
"scripts": { | ||
"start": "rollup -cw", | ||
"build": "rollup -c", | ||
"precommit": "npm run build && pretty-quick --staged", | ||
"test": "jest" | ||
}, | ||
"presets": ["env"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need this defined twice? Reference: https://github.com/OpenMined/syft.js/blob/master/.babelrc
rollup.config.js
Outdated
@@ -2,12 +2,19 @@ import babel from 'rollup-plugin-babel'; | |||
|
|||
export default { | |||
input: 'src/index.js', | |||
output: { | |||
output: [{ | |||
file: 'lib/index.js', | |||
name: 'Syft', | |||
format: 'iife', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is IIFE necessary anymore?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No its not should be UMD
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This all works fine. UMD covers everything via a script tag... ESM allows for ES6 import/export functionality.
No description provided.