For additional details, see this article in the k6 docs
What is this?
This is a template repository showing how to use webpack, babel and corejs to bundle a test project into a single test script which can be run by k6.
This means that you can write scripts using:
- node module resolution
- external node modules and getting them automatically bundled.
--compatibility-mode=base
, which does have performance benefits (1 2)
How to use it
# change main.js and package.json for your project
npm install .
npm run-script webpack
k6 run build/app.bundle.js