@@ -17,8 +17,8 @@ In your project's [plugins file](https://on.cypress.io/guides/plugins):
1717``` javascript
1818const browserify = require (' @cypress/browserify-preprocessor' )
1919
20- module .exports = (register , config ) => {
21- register ( ' on:spec: file:preprocessor' , browserify (config))
20+ module .exports = (on , config ) => {
21+ on ( ' file:preprocessor' , browserify (config))
2222}
2323```
2424
@@ -27,15 +27,15 @@ module.exports = (register, config) => {
2727Pass in options as the second argument to ` browserify ` :
2828
2929``` javascript
30- module .exports = (register , config ) => {
30+ module .exports = (on , config ) => {
3131 const options = {
3232 extensions: [],
3333 watchOptions: {},
3434 transforms: [],
3535 onBundle () {},
3636 }
3737
38- register ( ' on:spec: file:preprocessor' , browserify (config, options))
38+ on ( ' file:preprocessor' , browserify (config, options))
3939}
4040```
4141
@@ -116,11 +116,11 @@ If, for example, you want to update the options for the `babelify` transform to
116116``` javascript
117117const browserify = require (' @cypress/browserify-preprocessor' )
118118
119- module .exports = (register , config ) => {
119+ module .exports = (on , config ) => {
120120 const options = browserify .defaultOptions
121121 options .transforms [1 ].options .babelrc = true
122122
123- register ( ' on:spec: file:preprocessor' , browserify (config, options))
123+ on ( ' file:preprocessor' , browserify (config, options))
124124}
125125```
126126
0 commit comments