This repository was archived by the owner on Oct 1, 2020. It is now read-only.
File tree 3 files changed +21
-0
lines changed
3 files changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -151,6 +151,21 @@ module.exports = (on) => {
151
151
}
152
152
```
153
153
154
+ ## Debugging
155
+
156
+ You can see debug messages from this module by running with environment variable
157
+
158
+ ```
159
+ DEBUG=cypress:webpack
160
+ ```
161
+
162
+ You can see Webpack bundle diagnostic output (timings, chunks, sizes) by running with environment variable
163
+
164
+ ```
165
+ DEBUG=cypress:webpack:stats
166
+ ```
167
+ ![ Webpack stats] ( images/webpack-stats.png )
168
+
154
169
## Contributing
155
170
156
171
Use the [ version of Node that matches Cypress] ( https://github.com/cypress-io/cypress/blob/develop/.node-version ) .
Original file line number Diff line number Diff line change 1
1
const path = require ( 'path' )
2
2
const webpack = require ( 'webpack' )
3
3
const debug = require ( 'debug' ) ( 'cypress:webpack' )
4
+ const debugStats = require ( 'debug' ) ( 'cypress:webpack:stats' )
4
5
5
6
const createDeferred = require ( './deferred' )
6
7
const stubbableRequire = require ( './stubbable-require' )
@@ -149,6 +150,11 @@ const preprocessor = (options = {}) => {
149
150
}
150
151
151
152
debug ( 'finished bundling' , outputPath )
153
+ if ( debugStats . enabled ) {
154
+ /* eslint-disable-next-line no-console */
155
+ console . error ( stats . toString ( { colors : true } ) )
156
+ }
157
+
152
158
// resolve with the outputPath so Cypress knows where to serve
153
159
// the file from
154
160
latestBundle . resolve ( outputPath )
You can’t perform that action at this time.
0 commit comments