Skip to content
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

Closed

Conversation

tylersmalley
Copy link
Contributor

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.

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>
@epixa
Copy link
Contributor

epixa commented Jan 4, 2018

In what circumstances would you want to resolve symlinks in development but not in production?

@tylersmalley
Copy link
Contributor Author

If you're using yarn link or npm link as they use symlinks under the hood.

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.

@kimjoar
Copy link
Contributor

kimjoar commented Jan 8, 2018

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).

@tylersmalley
Copy link
Contributor Author

@kjbekkelund, no problem. Will do.

@tylersmalley
Copy link
Contributor Author

@kjbekkelund, is this something we are still able to do?

@elasticmachine
Copy link
Contributor

💔 Build Failed

@kimjoar
Copy link
Contributor

kimjoar commented Apr 16, 2018

We don't need symlinking in production yet (we put Kibana packages in the top-level node_modules when we build Kibana so they are available to plugins that are put in the plugins/ folder in production, see #16509).

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.

@tylersmalley
Copy link
Contributor Author

Closing this for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants