@jscutlery/cypress-angular-dev-server
v1.7.18
Published
This is an internal package used by [`@jscutlery/cypress-angular`](https://github.com/jscutlery/devkit/tree/main/packages/cypress-angular).
Downloads
210
Readme
Cypress Angular Dev Server
This is an internal package used by @jscutlery/cypress-angular
.
It is a helper for starting a Cypress 7+ dev server for Angular. It is used to build components in Cypress to be used in combination with @jscutlery/cypress-mount
.
It can be enabled by adding the configuration below to the *-e2e/src/plugins/index.ts
file:
import { startAngularDevServer } from '@jscutlery/cypress-angular-dev-server';
module.exports = (on, config) => {
on('dev-server:start', (options) =>
startAngularDevServer({ options, tsConfig: 'tsconfig.cypress.json' })
);
return config;
};
Custom Webpack configuration
It's possible to pass a custom Webpack configuration that will be merged with the Angular CLI configuration.
import { startAngularDevServer } from '@jscutlery/cypress-angular-dev-server';
module.exports = (on, config) => {
on('dev-server:start', (options) =>
startAngularDevServer({
options,
webpackConfig: { node: { global: true } },
})
);
return config;
};