Files
cypress/npm/webpack-dev-server
Dmitriy Kovalenko b1f831a86a fix(@cypress/react): Devtools unpredictable resets (#15612)
* fix: Devtools unpredictable resets

* Remove cleaning up from webpack-dev-server

* Fix lint errors

* Get back observer

* fix: bring back cleanup (#15634)

* fix: wait for fw teardown to do html teardown

* fix: port responsibility of teardown to frameworks

* chore: add comments

* fix: typings

* fix: react unmount cannot be called in the right hook

* run dtslint

Co-authored-by: Barthélémy Ledoux <bart@cypress.io>
Co-authored-by: ElevateBart <ledouxb@gmail.com>
2021-03-25 10:43:34 +10:00
..

Webpack-ct

Note

this package is not meant to be used outside of cypress component testing.

Install @cypress/vue or @cypress/react to get this package working properly

Responsibilities

  • Make a webpack.config from the users setup
    • add current project rules and aliases
    • remove eslint?
  • Launch webpack dev server
  • Update entry point (in src/browser.ts)
  • The entry point (browser.ts) has to delegate the loading of spec files to the loader + plugin

Performance tests

In order to get webpack performance statistics run yarn cypress open-ct or yarn cypress run-ct with WEBPACK_PERF_MEASURE env variable:

WEBPACK_PERF_MEASURE=true yarn cypress run-ct

This will output the timings of whole webpack output and timings for each specified plugin and loader.

Compare results

In order to run performance tests and compare timings with the previous build run:

WEBPACK_PERF_MEASURE=true WEBPACK_PERF_MEASURE_COMPARE={name-of-project} yarn cypress run-ct

This will create the file ./__perf-stats/{name-of-project}.json or if this file exists will compare results with the previously saved version.

In order to update the {name-of-project}.json file and use new stats as a base for the next comparisons run:

WEBPACK_PERF_MEASURE=true WEBPACK_PERF_MEASURE_UPDATE=true WEBPACK_PERF_MEASURE_COMPARE={name-of-project} yarn cypress run-ct