Files
cypress/cli/scripts/post-build.js
Lachlan Miller f0d3a48679 feat: React 18 support (#22876)
* update cli exports

* add additional react adapters

* update system test infra to better cover react versions

* use idiomatic cy.mount and cy.unmount

* add additional test projects

* update tests

* add new modules

* remove dead code, organize code more

* add react 16 project

* update webpack to resolve react correctly

* add test for react 16

* update snaps

* add react adapters

* ignore cli/react files

* use official rollup plugin to bundle npm/react

* update yarn lock for webpack dev server tests

* update vite dev server projects

* update config

* remove console.log

* update tsconfig

* fix tests

* fix another test

* update snaps

* update snaps

* fix build

* remove react{16,17}, update tests

* update build

* add missing export

* update test

* fixing tests

* fixing tests

* update snaps

* update snaps again

* build artifacts on circle

* dont try to update rollup plugin

* update circle

* update

* add missing build step

* update deps, remove old code

* revert circle changes

* do not hoist deps from react18

* remove deps
2022-07-22 11:35:09 +10:00

24 lines
570 B
JavaScript

const shell = require('shelljs')
const { resolve } = require('path')
shell.set('-v') // verbose
shell.set('-e') // any error is fatal
// For each npm package that is re-published via cypress/*
// make sure that it is also copied into the build directory
const npmModulesToCopy = [
'mount-utils',
'react',
'react18',
'vue',
'vue2',
]
npmModulesToCopy.forEach((folder) => {
// cli/mount-utils => cli/build/mount-utils
const from = resolve(`${__dirname}/../${folder}`)
const to = resolve(`${__dirname}/../build/${folder}`)
shell.cp('-R', from, to)
})