You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There was a noticeable slowdown in Gatsby 0.8 from 0.7 due mostly (I'm assuming) from the addition of several new Webpack loaders. This slowdown will only increase as more file-types get out-of-the-box support. To keep things speedy, it might work well to scan the pages directory on startup for which file extensions are there and then use that to choose which loaders to use.
The text was updated successfully, but these errors were encountered:
KyleAMathews
changed the title
Scan filesystem for which webpack loaders to add
FEATURE: Scan filesystem for which webpack loaders to add to lower startup time
Feb 26, 2016
KyleAMathews
changed the title
FEATURE: Scan filesystem for which webpack loaders to add to lower startup time
OPTIMIZATION: Scan filesystem for which webpack loaders to add to lower startup time
Feb 26, 2016
Along these lines I would suggest not taking on a dependency to node-sass, postcss, less, etc. The dependency tree for a stock install of gatsby is quite big leading to long install times. In webpack.config.js, common file extensions could still be preconfigured, but detect if the required loader is present in node_modules. If not, emit an error informing the user they need to install the necessary webpack loader to their own project. That way users of less don't have to incur the overhead of installing postcss and sass.
@dvonlehman thanks for the thoughts! My plan atm is to introduce a plugin system so all these options would be moved there and only added if you want sass or less, etc. I'll be posting an RFC once I can find enough time to pull that together.
There was a noticeable slowdown in Gatsby 0.8 from 0.7 due mostly (I'm assuming) from the addition of several new Webpack loaders. This slowdown will only increase as more file-types get out-of-the-box support. To keep things speedy, it might work well to scan the
pages
directory on startup for which file extensions are there and then use that to choose which loaders to use.The text was updated successfully, but these errors were encountered: