-
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
Implement absolute path babel transform #49766
Implement absolute path babel transform #49766
Conversation
…olute-path-babel-transform # Conflicts: # x-pack/legacy/plugins/lens/public/indexpattern_plugin/auto_date.ts
…olute-path-babel-transform # Conflicts: # x-pack/legacy/plugins/apm/public/components/shared/KueryBar/index.tsx # x-pack/legacy/plugins/canvas/types/index.ts # x-pack/legacy/plugins/lens/public/datatable_visualization_plugin/expression.tsx # x-pack/legacy/plugins/lens/public/indexpattern_plugin/auto_date.ts # x-pack/legacy/plugins/lens/public/indexpattern_plugin/plugin.tsx
…olute-path-babel-transform
Pinging @elastic/kibana-operations (Team:Operations) |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
…olute-path-babel-transform
This comment has been minimized.
This comment has been minimized.
…olute-path-babel-transform # Conflicts: # x-pack/legacy/plugins/canvas/canvas_plugin_src/expression_types/embeddable_types.ts
…not necessary and can't be installed outside of the repo
…olute-path-babel-transform
This comment has been minimized.
This comment has been minimized.
I suspect that a symlink approach might save you a few hundred lines of code, but overall I'd be fine with this approach if this is the preferred way from your end. I think the lack of support for root level imports is increasingly problematic, so trying to pick the one right solution from a handful of good options is doing more harm than good. Since this is more of a whitelist, I suspect we'll want an import from the root level @elastic/kibana-platform fyi |
Eh, idk, the babel transform (vs symlinks) is implemented in like 40 lines here. The rest of the changes are eslint changes that would be desirable either way I think. |
…olute-path-babel-transform # Conflicts: # src/legacy/core_plugins/data/public/index_patterns/fields/field.ts # src/legacy/ui/public/registry/field_formats.d.ts # x-pack/legacy/plugins/canvas/public/functions/to.ts # x-pack/legacy/plugins/graph/public/render_app.ts # x-pack/legacy/plugins/xpack_main/server/telemetry_collection/get_stats_with_xpack.ts
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
💔 Build FailedHistory
To update your PR or re-run it, just comment with: |
When we get back to this we can reopen it |
Fixes #40446 (POC)
This implements a babel plugin to support importing from
src/*
andx-pack/*
from any babel-transpiled code. In addition to the babel transform this work includes an extension to the custom module-migration ESLint rule to rewrite imports for../../../../../../src/*
withsrc/*
. Those fixes are not included in this PR, but are instead autofixed in CI temporarily so that while we work on this unnecessary conflicts won't pile up.