JSPM

  • Created
  • Published
  • Downloads 219529
  • Score
    100M100P100Q170870F
  • License MIT

Launches Webpack Dev Server for Component Testing

Package Exports

  • @cypress/webpack-dev-server

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@cypress/webpack-dev-server) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Webpack-ct

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

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