2022-04-26 14:00:01 +00:00
|
|
|
/// <reference types="cypress" />
|
2021-06-22 17:52:37 +00:00
|
|
|
// ***********************************************************
|
|
|
|
|
// This example plugins/index.js can be used to load plugins
|
|
|
|
|
//
|
|
|
|
|
// You can change the location of this file or turn off loading
|
|
|
|
|
// the plugins file with the 'pluginsFile' configuration option.
|
|
|
|
|
//
|
|
|
|
|
// You can read more here:
|
|
|
|
|
// https://on.cypress.io/plugins-guide
|
|
|
|
|
// ***********************************************************
|
|
|
|
|
|
|
|
|
|
// This function is called when a project is opened or re-opened (e.g. due to
|
|
|
|
|
// the project's config changing)
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @type {Cypress.PluginConfig}
|
|
|
|
|
*/
|
|
|
|
|
// eslint-disable-next-line no-unused-vars
|
2021-08-03 05:04:48 +00:00
|
|
|
module.exports = (on, config) => {
|
2022-04-26 14:00:01 +00:00
|
|
|
// `on` is used to hook into various events Cypress emits
|
|
|
|
|
// `config` is the resolved Cypress config
|
2023-12-28 09:46:16 +00:00
|
|
|
};
|
2022-04-26 14:00:01 +00:00
|
|
|
const webpack = require("@cypress/webpack-preprocessor");
|
|
|
|
|
module.exports = (on) => {
|
|
|
|
|
const options = {
|
|
|
|
|
webpackOptions: require("../webpack.config"),
|
2023-12-28 09:46:16 +00:00
|
|
|
watchOptions: {},
|
2022-04-26 14:00:01 +00:00
|
|
|
};
|
|
|
|
|
on("file:preprocessor", webpack(options));
|
2021-09-12 04:22:29 +00:00
|
|
|
};
|