-
Notifications
You must be signed in to change notification settings - Fork 3.3k
breaking: remove built-ins from @cypress/webpack-batteries-included-preprocessor
#31738
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
breaking: remove built-ins from @cypress/webpack-batteries-included-preprocessor
#31738
Conversation
@cypress/webpack-batteries-included-preprocessor
cypress
|
Project |
cypress
|
Branch Review |
breaking/remove_built_ins_from_webpack_5
|
Run status |
|
Run duration | 18m 46s |
Commit |
|
Committer | Bill Glesias |
View all properties for this run ↗︎ |
Test results | |
---|---|
|
0
|
|
8
|
|
1064
|
|
0
|
|
23193
|
View all changes introduced in this branch ↗︎ |
UI Coverage
0%
|
|
---|---|
|
4
|
|
0
|
Accessibility
97.09%
|
|
---|---|
|
0 critical
1 serious
0 moderate
0 minor
|
|
4
|
9066b10
to
7a6c78c
Compare
…rade as they should no longer be needed for most users
7a6c78c
to
2ca3df4
Compare
@@ -40,7 +40,7 @@ describe('devServer', function () { | |||
// Writing to disk includes the correct source map size, where the difference will be made up from stat size vs parsed size | |||
// This is critical if a user is trying to debug to determine if they have large source maps or other large files in their dev-server under test | |||
describe('writes to disk if DEBUG=cypress-verbose:webpack-dev-server:bundle-analyzer is set', async () => { | |||
const WEBPACK_DEV_SERVER_VERSIONS: (4 | 5)[] = [4, 5] | |||
const WEBPACK_DEV_SERVER_VERSIONS: (5)[] = [5] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we have a bad merge into the 15 branch. This is very likely failing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple of copy updates
Co-authored-by: Jennifer Shehane <[email protected]>
Co-authored-by: Jennifer Shehane <[email protected]>
@@ -146,42 +127,42 @@ const getDefaultWebpackOptions = () => { | |||
resolve: { | |||
extensions: ['.js', '.json', '.jsx', '.mjs', '.coffee'], | |||
fallback: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to set everything to false
or can we just not provide the fallback
config?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Honestly it isn't entirely clear 😂 . The recommendation AFAIK is to set the fallback to false. What I have noticed, though it isn't documented, is the polyfills sometimes make their way in when you don't specify a config and they just happen to exist in your node_modules directory. But that might be a side effect of something else

There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Just had one question.
Additional details
With the release of Cypress 15, we are removing the default built-ins from the
@cypress/webpack-batteries-included-preprocessor
as they are usually not used by end users within their cypress tests and bloat the user bundle. This is also to reduce security vulnerabilities introduced by the built-ins.Note: some tests needed to be pulled out into their own directory to prevent cross-pollination of the build-ins in the cypress config. Hence why the screenshots test and the node built in test were both moved
Steps to test
If wanting to use the built-ins, set up a project that has references to
path
within your spec file. notice the test fails because path is no longer provided by the preprocessorHow has the user experience changed?
PR Tasks
cypress-documentation
? chore: add migration guide for@cypress/webpack-batteries-included-preprocessor
built-ins removal cypress-documentation#6192type definitions
?