CometD does not start when bundled with rollup and rollup-plugin-commonjs
See original GitHub issueIssue Description
Ever since #858, I’m getting a Cannot read property 'cometdRuntime' of undefined
when attempting to initialize CometD. I believe that it may be because I’m bundling CometD into my app using rollup
and rollup-plugin-commonjs
.
Shouldn’t this patch be using var runtime = root['cometdRuntime'];
instead of var runtime = this['cometdRuntime'];
or check if this
exists ?
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
External dependencies are incorrectly bundled in rollup.js?
The answer I found was to include an additional argument to the rollup-plugin-node-resolve plugin call, as follows:
Read more >2.55.0 regression - Unable to bundle semver@7 #4195 - GitHub
When updating to @rollup/plugin-commonjs@19 , this bug disappears. ... The generated bundled cjs code does not rely on treeshaking and works equally well ......
Read more >rollup.js
Rollup is a module bundler for JavaScript which compiles small pieces of code into something larger and more complex, such as a library...
Read more >How to Bundle JavaScript With Rollup — Step-by-Step Tutorial
Learn how to use Rollup as a smaller, more efficient alternative to webpack and Browserify to bundle JavaScript files in this step-by-step tutorial...
Read more >Bundling an npm version of TinyMCE with ES6 and Rollup.js
Procedure · Content CSS for styling editor content. There are community and premium style skins available, or use custom content CSS. · Plugins...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I decided to rollback the fix for #858 (cometd/cometd-nodejs-client#17), so rollup should be fixed now.
I’m out next week, but I will take a look and fix this issue (or rollback to previous code). Thanks for the repro projects!