Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions examples/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
package-lock.json
react-replay-webpack4/dist/
34 changes: 12 additions & 22 deletions examples/react-replay-webpack4/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,25 +17,15 @@ Run `npm run build` to build the project. The build artifacts will be stored in

Run `npm run start` to launch index.html in a browser.

## Preparing for rollbar.js tests

(For rollbar.js maintainers)

Rollbar.js test automation includes tests that load and exercise this example app.
For those tests to work, main.js must be available and up to date in ./examples/webpack/dist/.
If the example app has changed or changes to rollbar.js need to be pulled in,
update and commit a new main.js.

```
# Build the rollbar.js dist if needed.
npm run build

# Prepare the example's npm bundle.
cd examples/react && npm install

# Build the output files.
npm run build

# The rollbar.js dist is no longer needed, and can be reverted.
cd ../.. && git checkout dist
```
## For rollbar.js maintainers

`dist/` is not committed. CI's `npm run validate:examples` installs and builds
this example against the current SDK, which checks that webpack 4 still resolves
`rollbar/replay` through `replay/package.json`.

The production build uses an absolute `publicPath`,
`/examples/react-replay-webpack4/dist/`, because `loadHtml` in
`test/util/fixtures.ts` recreates a page's scripts inside the test runner's
page, where a relative path would resolve against the wrong URL. Because `dist/`
is not committed, a browser test that loads this build would also need CI to
build the example before the browser tests run.
12 changes: 0 additions & 12 deletions examples/react-replay-webpack4/dist/index.html

This file was deleted.

31 changes: 0 additions & 31 deletions examples/react-replay-webpack4/dist/main.js

This file was deleted.

2 changes: 1 addition & 1 deletion examples/react-replay-webpack4/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ module.exports = (_env, argv) => ({
output: {
// rollbar.js tests require modified asset path.
// Detect whether running JIT or building the webpack bundle.
publicPath: argv.build ? '/examples/replay-react-webpack4/dist/' : '',
publicPath: argv.build ? '/examples/react-replay-webpack4/dist/' : '',
},
module: {
rules: [
Expand Down
Loading