Update examples to use local rollbar package and fix compatibility issues - #1247
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR updates all example projects to properly reference the local rollbar package and fixes compatibility issues that were preventing examples from building and running correctly. The changes ensure that examples use the local development version of rollbar rather than published versions, and resolve several build-breaking issues discovered during ESM migration testing.
- Updates package references in example projects to use local rollbar package
- Fixes syntax errors and missing files in Vue.js 3 example
- Resolves webpack configuration and Angular CLI issues
Reviewed Changes
Copilot reviewed 10 out of 17 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| package.json | Adds "module" field to support ES module resolution |
| examples/vuejs3/src/rollbar.js | Fixes syntax error in console.log statement |
| examples/vuejs3/package.json | Updates to use local rollbar package |
| examples/universal-node/package.json | Standardizes local package path format |
| examples/no-conflict/webpack.config.js | Excludes dist directory from babel transpilation |
| examples/no-conflict/package.json | Updates to use local rollbar package |
| examples/angular/package.json | Updates to use local rollbar package |
| examples/angular/angular.json | Disables analytics to prevent CI build hangs |
| examples/README.md | Adds comprehensive documentation for all examples |
| examples/.gitignore | Excludes build outputs and package-lock files |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
@waltjones I had to revert the I'm gonna solve this by integrating So the tests were timing out trying to load those js files. This wasn't affecting the vuejs3 example because we don't have a test/examples for vuejs3, only react, webpack and universalBrowser. |
Description of the change
Updates all example projects to properly reference the local rollbar package and fixes compatibility issues discovered during ESM migration testing.
Changes
Example Infrastructure
examples/README.mddocumenting all example projects and their purposes.examples/.gitignoreto excludebuild outputs andpackage-lock files.react,angularandvuejs3examples to use local rollbar package ("rollbar": "file:../..")Compatibility Fixes
Vue.js 3 Example
src/assets/main.cssfile that was causing build failuressrc/rollbar.js(unclosed string)"module"field to root package.json to support Vite's ES module resolutionNo-Conflict Example
distdirectory from babel transpilationAngular Example
"analytics": falseto angular.json to prevent CLI from waiting for user input during CI buildsType of change
Related issues
SDK-518/make-sure-all-sdk-examples-work-properly