Open pollen8 opened 3 years ago
I get results very similar to yours:
Craco only, no es-build
SMP ⏱
General output time took 36.45 secs
SMP ⏱ Plugins
IgnorePlugin took 6.18 secs
TerserPlugin took 4.87 secs
ESLintWebpackPlugin took 2.6 secs
OptimizeCssAssetsWebpackPlugin took 0.313 secs
HtmlWebpackPlugin took 0.153 secs
ManifestPlugin took 0.015 secs
ForkTsCheckerWebpackPlugin took 0.01 secs
ModuleNotFoundPlugin took 0 secs
MiniCssExtractPlugin took 0 secs
ProvidePlugin took 0 secs
InlineChunkHtmlPlugin took 0 secs
InterpolateHtmlPlugin took 0 secs
DefinePlugin took 0 secs
SMP ⏱ Loaders
babel-loader took 25.56 secs
module count = 3379
modules with no loaders took 6.94 secs
module count = 189
svg-inline-loader took 3.8 secs
module count = 491
@svgr/webpack, and
file-loader took 0.941 secs
module count = 1
mini-css-extract-plugin, and
css-loader, and
postcss-loader took 0.612 secs
module count = 1
css-loader, and
postcss-loader took 0.553 secs
module count = 1
html-webpack-plugin took 0.034 secs
module count = 1
Craco with es-build
SMP ⏱
General output time took 30.39 secs
SMP ⏱ Plugins
IgnorePlugin took 4.83 secs
ESLintWebpackPlugin took 2.6 secs
HtmlWebpackPlugin took 0.15 secs
ForkTsCheckerWebpackPlugin took 0.026 secs
ManifestPlugin took 0.015 secs
MiniCssExtractPlugin took 0.002 secs
InlineChunkHtmlPlugin took 0.001 secs
ModuleNotFoundPlugin took 0 secs
ProvidePlugin took 0 secs
InterpolateHtmlPlugin took 0 secs
DefinePlugin took 0 secs
SMP ⏱ Loaders
modules with no loaders took 20.96 secs
module count = 3373
@svgr/webpack, and
svg-inline-loader took 7.29 secs
module count = 491
esbuild-loader took 5.44 secs
module count = 147
@svgr/webpack, and
file-loader took 1.19 secs
module count = 1
mini-css-extract-plugin, and
css-loader, and
postcss-loader took 0.922 secs
module count = 1
css-loader, and
postcss-loader took 0.869 secs
module count = 1
html-webpack-plugin took 0.015 secs
module count = 1
So I went from modules with no loaders took 6.94 secs to modules with no loaders took 20.96 secs
I'm wondering if the issue wouldn't be caused by the fact that we fail to exclude node_modules or something like that.
I'm bumping this as I encountered the same problem as @pollen8 ..
Hi I've only started playing with craco and this plugin tonight, so I may well be missing something pretty obvious.
We have a large CRA typescript project which I'm experimenting with. The craco.config.js looks as follows:
If I disable CracoEsbuildPlugin and run
I get the following
with CracoEsbuildPlugin enabled I'm seeing
so whilst esbuild is quiker (yay!) ForkTsCheckerWebpackPlugin is approx 3 times longer and modules with no loaders twice as long
I'm stumped as to why I'm seeing such a difference here - does anyone have any ideas?
Thanks!