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
Clone of LINK REDACTED applicable to the UI codebase in this (x-plugins) repo
One of the benefits of the ES6 import syntax is that it enables static analysis. Our use of webpack aliases limits the benefit by making some import paths dynamic.
I don't know what all the ramifications of this change would be, but I wanted to float the idea of removing our use of aliases.
This can be split up into a number of incremental steps:
Replace plugins/${plugin.id} imports with ${plugin.directory}/public
Repeat the same 3 steps above for require expressions (is this worth the effort? require won't gain the same static analysis benefits that import statements do, but it'll be necessary if we want to remove the aliases entirely)
The text was updated successfully, but these errors were encountered:
Original comment by @ycombinator:
Clone of LINK REDACTED applicable to the UI codebase in this (x-plugins) repo
One of the benefits of the ES6 import syntax is that it enables static analysis. Our use of webpack aliases limits the benefit by making some import paths dynamic.
I don't know what all the ramifications of this change would be, but I wanted to float the idea of removing our use of aliases.
This can be split up into a number of incremental steps:
src/ui/public
- place on hold because of Remove use of 'ui' webpack alias in non-ui code #7292 (comment)plugins/${plugin.id}
imports with${plugin.directory}/public
require
expressions (is this worth the effort?require
won't gain the same static analysis benefits that import statements do, but it'll be necessary if we want to remove the aliases entirely)The text was updated successfully, but these errors were encountered: