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
Currently, the path aliases opensearch-dashboards/public and opensearch-dashboards/server are defined in the tsconfig and are widely used throughout the codebase. However, these aliases are only functional for TypeScript types. They are not configured for Webpack or Babel, leading to failures during development when running dev server or production builds failed when build for release when these imports contain actual modules rather than just types.
Expectation
The path alias should work for module imports not just only TS types, so I don't have to use relative path when importing modules like import {...} from '../../../../src/core/public'. Instead, I can simply type import {...} from 'opensearch-dashboards/public'.
What to do
Add path alias support for webpack to ensure browser side code can be compiled successfully during development and build
Add path alias support for babel to ensure server side code can be transpiled successfully
Ensure jest unit tests also works with path alias
The text was updated successfully, but these errors were encountered:
Problem
Currently, the path aliases
opensearch-dashboards/public
andopensearch-dashboards/server
are defined in the tsconfig and are widely used throughout the codebase. However, these aliases are only functional for TypeScript types. They are not configured for Webpack or Babel, leading to failures during development when running dev server or production builds failed when build for release when these imports contain actual modules rather than just types.Expectation
The path alias should work for module imports not just only TS types, so I don't have to use relative path when importing modules like
import {...} from '../../../../src/core/public'
. Instead, I can simply typeimport {...} from 'opensearch-dashboards/public'
.What to do
The text was updated successfully, but these errors were encountered: