-
Notifications
You must be signed in to change notification settings - Fork 1
Added gzipped JS build for CDN with JS core bundled #222
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
Conversation
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
Add AWS CLI configuration and upload to CDN
js-chat/rollup.config.mjs
Outdated
| input: "./main.mjs", | ||
| external: [], // Bundle everything | ||
| output: { | ||
| file: `dist/pubnub-chat.${pkg.version}.js`, |
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.
Can we move both bundles to a separate folder?
Separate folder like: upload not related to the NPM distribution + less chances to drag something unwanted to the CDN.
So far I've configured CDN upload artifacts location to the: js-chat/upload/*.js
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.
Ok, I will move it.
js-chat/rollup.config.mjs
Outdated
| browser: true, | ||
| preferBuiltins: false | ||
| }), | ||
| commonjs() |
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.
If it possible, can we compress (gzip) both bundles with @rollup/plugin-typescript?
In JS SDK it goes after last plugin, to work on the resulting bundle like this:
gzipPlugin({ fileName: '' }),imported it with require:
const gzipPlugin = require('rollup-plugin-gzip').default;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.
I will compress them.
parfeon
left a comment
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.
LGTM!
No description provided.