Commit f15befd
committed
Build ESM -> CJS before running tests in browsers via Saucelabs
Noteworthy tweak is the fact that it seems `zuul` are eagerly loading
all `require('whatever-package-or-path')` it sees before pushing the
contents to Saucelabs.
That was troublesome because we don't want the `esm` package to be
loaded when running browser tests. But it was, even though we loaded
`esm` conditionally after checking the current Node.js version used.
The trick was to not use `require('esm')` but `module.require('esm')`
instead, to fool the assumed look-out for `require` somewhere inside
`zuul`'s code.1 parent 3e29d67 commit f15befd
2 files changed
Lines changed: 12 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
5 | 7 | | |
6 | | - | |
7 | | - | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
8 | 15 | | |
9 | | - | |
10 | 16 | | |
11 | 17 | | |
12 | 18 | | |
0 commit comments