-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[optimizer] Disable symlink resolution by default in production #15838
[optimizer] Disable symlink resolution by default in production #15838
Conversation
This provides a small ~5% gain in build time and is recommended by the Webpack team. https://webpack.js.org/guides/build-performance/#resolving This adds a configuration option `optimize.resolveSymlink` which is false in production, and defaults to true in development. In the future we might consider this always defaulting to false. Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
In what circumstances would you want to resolve symlinks in development but not in production? |
If you're using We could disable this for development by default as well, but we would need to educate folks on it. I figure we let devs disable it, that way they know it exists should they need to work on a dependency locally. |
Can you hold off on this a couple days? I'm trying to get the different build things for new platform PR'd, and I think they might end up conflicting with this (by using symlinks for Kibana plugins, also in production). |
@kjbekkelund, no problem. Will do. |
@kjbekkelund, is this something we are still able to do? |
💔 Build Failed |
We don't need symlinking in production yet (we put Kibana packages in the top-level However, at some point I think we might want to enable plugins to share packages, e.g. x-pack specific packages or Canvas specific packages. There are some details in #16481. Not sure we'll ever get there though, but I think we could get there. So I'm not sure if we want to merge this or not. To me it seems like it isn't worth it in the near-term, as it can complicate things for us when we want to push further on the packages stuff. |
Closing this for now. |
This provides a small ~5% gain in build time and is recommended by the Webpack team. https://webpack.js.org/guides/build-performance/#resolving
This adds a configuration option
optimize.resolveSymlink
which is false in production and defaults to true in development. In the future, we might consider this always defaulting to false.