File tree Expand file tree Collapse file tree 4 files changed +27
-2
lines changed
Expand file tree Collapse file tree 4 files changed +27
-2
lines changed Original file line number Diff line number Diff line change 22const webpack = require ( 'webpack' ) ;
33const path = require ( 'path' ) ;
44const fs = require ( 'fs' ) ;
5- const paths = require ( './paths' ) ;
65const HtmlWebpackPlugin = require ( 'html-webpack-plugin' ) ;
76const MiniCssExtractPlugin = require ( 'mini-css-extract-plugin' ) ;
87const CaseSensitivePathsPlugin = require ( 'case-sensitive-paths-webpack-plugin' ) ;
98const threadLoader = require ( 'thread-loader' ) ;
10- const WatchMissingNodeModulesPlugin = require ( '../scripts/utils/WatchMissingNodeModulesPlugin' ) ;
119const env = require ( '@codesandbox/common/lib/config/env' ) ;
1210const getHost = require ( '@codesandbox/common/lib/utils/host' ) ;
1311const postcssNormalize = require ( 'postcss-normalize' ) ;
12+ const WatchMissingNodeModulesPlugin = require ( '../scripts/utils/WatchMissingNodeModulesPlugin' ) ;
13+ const paths = require ( './paths' ) ;
1414
1515const babelDev = require ( './babel.dev' ) ;
1616const babelProd = require ( './babel.prod' ) ;
@@ -384,6 +384,7 @@ module.exports = {
384384 / b r o w s e r f s \. m i n \. j s / ,
385385 / s t a n d a l o n e - p a c k a g e s \/ c o d e s a n d b o x - b r o w s e r f s / ,
386386 / s t a n d a l o n e - p a c k a g e s \/ v s c o d e \/ / ,
387+ / f o n t f a c e o b s e r v e r \. s t a n d a l o n e \. j s / ,
387388 ] ,
388389 } ,
389390
Original file line number Diff line number Diff line change 1010 "license" : " MIT" ,
1111 "scripts" : {
1212 "build" : " cross-env NODE_ENV=production NODE_OPTIONS=\" --max-old-space-size=4096\" node scripts/build.js" ,
13+ "build:stats" : " cross-env NODE_ENV=production NODE_OPTIONS=\" --max-old-space-size=4096\" webpack --env production --config config/webpack.prod.js --json --profile --progress > stats.json && node scripts/stats" ,
1314 "build:clean" : " rimraf www" ,
1415 "build:embed" : " cross-env NODE_ENV=production webpack --config config/webpack.embed.js" ,
1516 "build:sandbox" : " cross-env NODE_ENV=production SANDBOX_ONLY=true node scripts/build.js" ,
Original file line number Diff line number Diff line change 1+ /* eslint-disable */
2+ const stats = require ( '../stats.json' ) ;
3+
4+ const longTime = stats . modules . filter ( stat => {
5+ if ( stat . profile && stat . profile . building > 1000 ) {
6+ return stat ;
7+ }
8+ } ) ;
9+
10+ longTime
11+ . sort ( ( a , b ) => ( a . profile . building > b . profile . building ? 1 : - 1 ) )
12+ . forEach ( stat => {
13+ console . log (
14+ JSON . stringify (
15+ {
16+ id : stat . id ,
17+ profile : stat . profile ,
18+ } ,
19+ null ,
20+ 2
21+ )
22+ ) ;
23+ } ) ;
You can’t perform that action at this time.
0 commit comments