I’m using browserify as suggested in the modules docs but I’m hitting this error:
browserify -s foobar normal-user.js -o k6-browserified-source.js
Error: Cannot find module ‘k6’ from ‘/…/k6/my-tests’
Any tips on how to browserify code that’s using the k6 builtin module?
I would love a working example code I can download with the commands to run in k6’s cloud (loadimpact) and that uses modular code - are there any available?
Also: Am I correct in my understanding that:
- k6 cloud only accepts one file.js
- we are trying to use browserify to generate a single js file for the whole application? i.e. if I import/require files from my filesystem we instead use browserify to bundle all those files together in to one file?