167 Commits

Author SHA1 Message Date
Colum Ferry
1dcfbeeeee
feat(testing): e2e-ci should use serve-static or vite preview for playwright and cypress (#27240)
- fix(vite): preview should dependOn build
- fix(react): playwright should use vite preview
- fix(vue): playwright should use vite preview
- fix(web): playwright should use vite preview
- chore(testing): add e2e test

<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

<!-- Please make sure that your commit message follows our format -->
<!-- Example: `fix(nx): must begin with lowercase` -->

<!-- If this is a particularly complex change or feature addition, you
can request a dedicated Nx release for this pull request branch. Mention
someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they
will confirm if the PR warrants its own release for testing purposes,
and generate it for you if appropriate. -->

## Current Behavior
<!-- This is the behavior we have today -->
Currently, `playwright` uses the `vite serve` command when setting up
the web server to run the e2e tests against.

The `vite preview` command/target should also depend on `vite build`.

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
`playwright` should use the `vite preview` command when setting up the
web server

`vite preview` targets add a `dependsOn["build"]`

Ensure `serve-static` has a dependsOn: ['build']

Cypress should use the `ciBaseUrl` if it exists when running the
`e2e-ci` targets

Migrations for Playwright and Cypress to use serve-static and preview
correctly

## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->

Fixes #
2024-08-02 11:56:07 -04:00
Katerina Skroumpelou
1d1d465d12
feat(misc): align version of @types/node throughout repo (#20883) 2024-01-02 18:59:03 +02:00
Jack Hsu
507fe42e4f
feat(webpack): add plugin to automatically configure build and serve targets (#20243) 2023-11-28 13:01:03 -05:00
Jack Hsu
cd38d51482
feat(web): add verbose logging to waitForPortOpen function (#20260) 2023-11-21 10:57:19 -05:00
Jack Hsu
fe4682a0e7
fix(web): use 127.0.0.1 loopback address when checking if a port is open (#17192) 2023-05-24 15:28:48 -04:00
Jack Hsu
c97502af3a
feat(react): run remote serve in parallel to speed up server startup (#17112) 2023-05-24 08:57:47 -04:00
Jason Jean
2d195007b0
feat(core): switch packages to use the @nx scope (#16069) 2023-04-14 19:56:37 -04:00
Jack Hsu
f49769a34a
feat(webpack): add webpack plugin (#11966) 2022-09-12 21:19:50 +01:00
Jack Hsu
11219071f6
feat(web): update node types to 18.7.1 (#11546) 2022-08-11 14:23:35 +00:00
Leosvel Pérez Espinosa
01f7376169
cleanup(misc): consolidate tslib version in generated projects (#11185) 2022-07-19 12:59:37 -04:00
Jack Hsu
d657f912d9
feat(web): upgrade webpack plugin versions (#11191) 2022-07-18 15:23:30 -04:00
Caleb Ukle
8154191eb1
feat(testing): Cypress 10 and component testing support (#9201)
* feat(testing): add generator to aid in the migration to cypress 10

cypress 10 introduces a new configuration format and new layout that requires update settings and
files for e2e projects

* feat(testing): cypress component tests for react/next

initial work for cypress component tests for react and next

* feat(testing): add support for v10 e2e cypress projects

create the correct files for cypress projects >v10 and reorganize tests based on version to allow
easier parsing of tests

* feat(testing): add utils for modifying cypress v10 config

provide ts transformers to take in an existing cypress config and update/add properties within the
given configuration

* fix(testing): fix tests affected by the cypress v10 changes

update tests to assert the correct files/folders/file contents due to the cypress changes in v10

* cleanup(testing): move cypress component testing plugins into the respective packages

move the plugins into out of cypress plugins into the specific vertical plugin to prevent issues
with circular refs

* cleanup(testing): bump cypress version

bump to latest cypress v10 release

* docs(testing): update docs for cypress 10

update cypress docs to include info about component testing and migration to cypress v10

* fix(repo): revert cypress version bump

keep v9 of cypress installed for nx repo until v10 release

* fix(testing): update cypress gen tsconfig and infer targets with converter

* fix(testing): make sure tests use the cypress v10 (for the intermediate)

* fix(testing): update target name after feedback

* fix(testing): support multiple target w/custom configs for cypress v10 migration

* fix(testing): refactor cy component tests into seperate verticals

* feat(testing): create storybook cypress preset

* fix(testing): clean up cy v10 migration

* fix(testing): don't branch for cypress executor testingType

* fix(testing): move cy comp test generator to next

* fix(testing): bump cypress deps

* fix(testing): clean up cy component testing generators

* fix(testing): update cy component testing docs

* fix(testign): dep check. runtime plugin pulls from @nrwl/react

* fix(testing): move e2e into verticals

* fix(testing): address PR feedback

* fix(testing): clean up unit tests

* feat(angular): support migrating angular cli workspaces using cypress v10

* chore(testing): update e2e tests

* fix(testing): address pr feedback

* chore(testing): remove cypress component testing for next.js

* fix(testing): address pr feedback

Co-authored-by: Leosvel Pérez Espinosa <leosvel.perez.espinosa@gmail.com>
2022-07-08 14:34:00 -05:00
Jack Hsu
bf11bbf709
feat(node): update @types/node to 18.0.0 (#10916) 2022-06-27 14:33:48 +00:00
Nikola Radulaški
f7a61dc2f2
fix(web): in webpack style-loader should be used when extract-css is false (#10192)
* fix(web): in webpack style-loader should be used when extract-css is false

* fix(web): remove unnecessary fallback

true value is already being read from schema
2022-06-15 09:00:57 -04:00
Phillip Barta
b9e623d84d
cleanup(repo): refactored fileutils (#10503) 2022-06-08 10:38:34 -04:00
Nikola
daddcde73c
fix(web): fix dev-server deprecation warning (#10203)
This  PR will resolve deprecation warning:
(node:62713) [DEP_WEBPACK_DEV_SERVER_HTTPS] DeprecationWarning: 'https' option is deprecated. Please use the 'server' option.
2022-05-30 15:58:18 -04:00
Takashi Machinaga
85b185752c
fix(web): enable tree shaking (#8296) 2022-05-30 13:38:22 -04:00
Jason Jean
04985be149
chore(repo): switch publishing to use lerna (#10293) 2022-05-20 00:35:47 +00:00
Jack Hsu
fecbb81120
fix(react): set mode correctly when serve --prod is used (#10235)
Fixes #10199
2022-05-10 09:56:42 -04:00
Aaron Dang
0c614b2d6b
fix(web): option --no-runtimeChunk is not working (#7747)
Co-authored-by: Tuan Dang <tuandang@i3-automation.com>
2022-04-26 17:14:00 -04:00
Jack Hsu
7913f31cff
fix(react): use normalized app name in host/remote generators (#9909) 2022-04-21 02:54:39 +00:00
Jason Jean
cb7fb22bca
feat(core): remove @types/node from default workspace (#9853)
Signed-off-by: Jason Jean <jasonjean1993@gmail.com>
2022-04-20 12:43:23 -04:00
CommanderRoot
05a9544806
cleanup(misc): replace deprecated String.prototype.substr()
* cleanup(misc): replace deprecated String.prototype.substr()

.substr() is deprecated so we replace it with .slice() which works similarily but isn't deprecated

Signed-off-by: Tobias Speicher <rootcommander@gmail.com>

* fix(js): fix slice change

Co-authored-by: Jason Jean <jasonjean1993@gmail.com>
2022-04-01 23:04:26 +00:00
Victor Savkin
2071c2e5da
fix(repo): fix builds 2022-03-24 16:37:00 -04:00
Jack Hsu
ec533c521d
feat(react): update packages (#9296) 2022-03-11 12:18:40 -05:00
Phillip Barta
5bf37f00bd
fix(web): remove deep import of webpack ProgressPlugin (#8892) 2022-02-11 15:14:18 -05:00
Xinan
3c25a1ce02
fix(web): support custom webpack config written in TypeScript for web:build (#8939) 2022-02-11 15:04:20 -05:00
Phillip Barta
1f3fbab947
chore(web): update webpack-subresource-integrity to 5.1.0 (#8890) 2022-02-10 18:26:14 -05:00
Jack Hsu
85da21bf29
fix(react): update storybook config to skip type checking (#8922) 2022-02-10 17:32:52 +02:00
Jack Hsu
475143b3b4
feat(react): add postcssConfig option to apps to enable auto-loading or set a single path (#8849) 2022-02-05 12:24:07 -05:00
Jack Hsu
120e987580
fix(react): fix issue with postcss and images in webpack config (#8802)
Fixes #8300
2022-02-01 11:43:01 -05:00
Phillip Barta
be91d1f99a
fix(core): stop inlining tsconfig-paths-webpack-plugin and use version with fix (#8357) 2022-01-27 08:59:46 -05:00
Phillip Barta
78c9f158a7
fix(web): remove terser from dependencies and update terser-webpack-plugin (#8631) 2022-01-27 08:53:24 -05:00
David Slabý
657d93ae7f
fix(web): shouldSkip get of undefined fixed, chunk push into Set fixed (#8140)
Co-authored-by: david.slaby <david.slaby@chyronhego.com>
2021-12-23 19:07:08 +00:00
Jack Hsu
f8c394af46
feat(web): add swc compiler option for webpack executor (#8114) 2021-12-10 16:09:20 -05:00
Jack Hsu
157c6e0fb0
feat(web): rename @nrwl/web:build to @nrwl/web:webpack (#7952) 2021-11-30 14:22:34 -05:00
Nico
5bc169264b
fix(web): custom typescript webpack config files are now compatible for react applications (#7633)
When a typescript webpack config file is provided as an option for the web build executor
`nx
run
project:serve` will not fail because the file type is typescript.
ISSUES CLOSED: #7454
2021-11-05 21:50:45 +00:00
Jack Hsu
22294e98a5
chore(react): update react packages (#7434) 2021-10-19 22:08:55 -04:00
Jack Hsu
5028a9116c fix(web): fix index html generator for webpack 5 2021-10-19 16:30:55 -04:00
Jack Hsu
9c1ae3a1b0
chore(web): clean up webpack setup (#7411) 2021-10-19 09:07:33 -06:00
Jack Hsu
bedad1cc77
fix(core): patch resolve logic for tsconfig paths (#7387) 2021-10-15 20:47:18 +00:00
Jack Hsu
ed11e6ca73 fix(web): turn off fully specified option in webpack so packages like graphql@14 will not break build 2021-10-14 17:03:35 -04:00
Jack Hsu
8779a22be3
chore(core): move webpack utils into web and node packages (#7367) 2021-10-14 18:50:46 +00:00
Jack Hsu
f9fe52bb18
fix(web): add support for barrel exports in web build (#7354) 2021-10-14 10:07:51 -04:00
Jack Hsu
fc3573f1ca
chore(web): remove install and build warnings (#7343) 2021-10-14 05:27:30 +02:00
Jack Hsu
086f67d4bd
chore(web): remove build options deprecated since Nx 11 (#7330) 2021-10-13 05:48:31 +00:00
Jack Hsu
724b0c0e3c
feat(core): upgrade to webpack 5 (#7283)
* feat(core): upgrade to webpack 5

* chore(core): update webpack 5 docs
2021-10-13 00:34:28 -04:00
Jack Hsu
a8bcd27933
fix(react): apply postcss config from apps to their lib dependencies (#7265)
Fixes #7040
2021-10-08 14:10:25 -04:00
Jack Hsu
0d3601e8cb
fix(react): use default module resolution (#7254)
Fixes #6662
2021-10-05 15:00:07 -04:00
Dan Roujinsky
268fc20305
fix(web): add postcss loader in sass, less and stylus module files (#7141) 2021-10-04 14:52:01 -04:00